Ti

Java code posted
created at 02 Jan 13:23

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Page reference to your VF Page
PageReference pageRef = Page.TestPage;
Test.setCurrentPage(pageRef);
 
//Pass necessary parameter
pageRef.getParameters().put('Id',id); 
 
//init controller 
CustomCtrl objCtrl = new CustomCtrl();
 
//Call pageRef mymethod
PageReference objPageRef = objCtrl.mymethod();
 
//Put system asserts
System.assertEquals (null,pageRef);
375 Bytes in 3 ms with coderay