+ Start a Discussion

Test coverage for setCookies method

I am adding cookie to my page in the controller using 


ApexPages.currentPage().setCookies(new Cookie[]{CookieName});


When am trying to get the code coverage, my test class is not covering the above line.

How to get the code coverage for the above setcookie method in the test class.