📜  测试未来的方法 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:23.143000             🧑  作者: Mango

代码示例1
@isTest
global class SMSCalloutMock implements HttpCalloutMock {
    global HttpResponse respond(HttpRequest req) {
        // Create a fake response
        HttpResponse res = new HttpResponse();
        res.setHeader('Content-Type', 'application/json');
        res.setBody('{"status":"success"}');
        res.setStatusCode(200);
        return res;
    }
}