How to cover the test coverage for getURL method?

To cover the test coverage for getURL method, use Test.setCurrentPage(Page.PageName).

Test.setCurrentPage(Page.PageName) will help you to cover the codes which makes use of ApexPages.currentPage().getUrl().

Cheers!!!

No comments:

Post a Comment