You need to sign in to do that
Don't have an account?
Anish Mahadik 1
I am unable to get code coverage for Cancel button(which resets the entire page).
Hi all,
I am unable to create the test class for cancel button. I tried but got error
Argument 1 cannot be null.
Please provide the test class for following code
public pagereference cancel()
{
PageReference reqPageRef = new PageReference(ApexPages.currentPage().getParameters().get('retURL'));
reqPageRef.setRedirect(true);
return reqPageRef;
}
Thanks
I am unable to create the test class for cancel button. I tried but got error
Argument 1 cannot be null.
Please provide the test class for following code
public pagereference cancel()
{
PageReference reqPageRef = new PageReference(ApexPages.currentPage().getParameters().get('retURL'));
reqPageRef.setRedirect(true);
return reqPageRef;
}
Thanks
You can try this :
Note: you should update here accordingly
Thanks
Niraj
All Answers
<YOUR_CONTROLLER_INSTANCE_REF>.cancel();
like
MyController myCon = new MyController();
myCon.cancel();
You can try this :
Note: you should update here accordingly
Thanks
Niraj