This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IsTest | |
public class HttpMock implements HttpCalloutMock { | |
private static final String ANY_URL = null; | |
private Map<String, Map<String, Object>> responses = new Map<String, Map<String, Object>>(); | |
// PUBLIC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************ | |
*** @author: Suraj Pillai | |
*** @description: A universal class for mocking in tests. Contains a method for setting the return value for any method. Another method returns the number of times a method was called | |
*/ | |
@isTest | |
public with sharing class UniversalMocks implements System.StubProvider { | |
public static Map<String, Object> returnValuesMap = new Map<String, Object>(); | |
public static Map<String, Integer> callCountsMap = new Map<String, Integer>(); |
OlderNewer