TestUtils
@IsTest global class TestUtils
Description
Utility methods to support unit testing.
Methods
setMock
global static HttpCalloutMock setMock(final HttpCalloutMock mock)
Description
Sets an HTTP callout mock for a unit test. This method must be called from external code requiring use of the Docusign REST API mocks instead of calling
Test.setMock directly.Returns
The HTTP callout mock.
Parameters
mockfinal HttpCalloutMock mock
An instance of a class implementing the
HttpCalloutMock interface. setMock
global static WebServiceMock setMock(final WebServiceMock mock)
Description
Sets an SOAP callout mock for a unit test. This method must be called from external code requiring use of the Docusign SOAP API mocks instead of calling
Test.setMock directly.Returns
The SOAP callout mock.
Parameters
mockfinal WebServiceMock mock
An instance of a class implementing the
WebServiceMock interface.