Salesforce WSDL测试类mock

@isTest
global class NCWebServiceMock implements WebServiceMock {
   global void doInvoke(
           Object stub,
           Object request,
           Map response,
           String endpoint,
           String soapAction,
           String requestName,
           String responseNS,
           String responseName,
           String responseType) {
       NCwebserviceserver.sendToWISEResponse_element prothttp = new NCwebserviceserver.sendToWISEResponse_element();
       prothttp.return_x = '[{"Errno":"0","Errmsg":"保存成功","Billcode":"SSGM01000021"}]';
       response.put('response_x', prothttp);
      
   }
}

 

你可能感兴趣的:(测试类)