ads

Wednesday, 29 August 2018

Cover Page Reference method in test class in Salesforce

Apex Class:

public class Reference {
    public 
Reference () {
    }
    
    public PageReference SFDCForyou() {
        PageReference pr = new PageReference('http://www.SFDCForyou.com');
        pr.setRedirect(true);
        return pr;
    }
}

Test class:

@isTest
private class Testclass {
    @isTest static void test() {
        
Reference r = new Reference ();
        r.
SFDCForyou();
    }
}

No comments:

Post a Comment