Activity › Forums › Salesforce® Discussions › How to write stubs in Salesforce?

  • Anjali

    Member
    May 13, 2020 at 11:41 AM

    To use a stub version of an Apex class:
    1. Define the behavior of the stub class by implementing the System. StubProvider interface.
    2. Instantiate a stub object by using the System. Test. createStub() method.
    3. Invoke the relevant method of the stub object from within a test class.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Salesforce Interview Questions and Answers - For Freshers and Experienced Candidates

Video in

Learn most important Salesforce Interview Questions and Answers, asked at every interview. These Interview questions will be useful to all entry-level candidates, beginners, interns, and…