You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By creating mockList in the test, a virtual copy of fflib_MyList is created that is used instead. Generally mocking classes, as done in this test, is for isolating the target of testing from referenced dependencies. In this case, 'mockListwould be provided to a class being tested so that the business-logic version offflib_MyList` is not used.
public class fflib_MyList implements IList {
List myList;
}
@istest
private class MockTest {
static testMethod void testBehavior() {
// Given
fflib_ApexMocks mocks = new fflib_ApexMocks();
fflib_MyList.IList mockList = (fflib_MyList.IList)mocks.mock(fflib_MyList.class);
}
The text was updated successfully, but these errors were encountered: