Salesforce Certified Application Architect

Friday 27 December 2013

Test class of Web Service Callouts class..

@isTest
private class WebSvcCalloutTest {
    @isTest static void testEchoString() {            
        // This causes a fake response to be generated
   
        Test.setMock(WebServiceMock.class, new WebServiceMockImpl());
       
        // Call the method that invokes a callout
   
        String output = WebSvcCallout.callEchoString('Hello World!');
       
        // Verify that a fake result is returned
   
        System.assertEquals('Mock response', output);
    }
}

No comments:

Post a Comment

Salesforce Certified Application Architect & Certified Data Architecture and Management Designer Exam

How to pass Salesforce Certified Data Architecture and Management Designer Exam This exam was 1st architect exam for me. Its not that muc...