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