Activity Forums Salesforce® Discussions What is mock test class in Salesforce?

  • Aditya

    Member
    April 23, 2020 at 4:13 pm

    Provide an implementation for the HttpCalloutMock interface to specify the response sent in the respond method, which the Apex runtime calls to send a response for a callout.
    global class YourHttpCalloutMockImpl implements HttpCalloutMock {
    global HTTPResponse respond(HTTPRequest req) {
    // Create a fake response.
    // Set response values, and
    // return response.
    }
    }

  • Pooja

    Member
    April 24, 2020 at 11:46 am

    Provide an implementation for the HttpCalloutMock interface to specify the response sent in the respond method, which the Apex runtime calls to send a response for a callout.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos