/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static testMethod void t1() { //setup test data Test.startTest(); User u = TestUtility.createTestUser([select id, name from Profile where name='Standard User' limit 1]); System.runAs(u) { } Test.stopTest(); }