• bhavesh shahu
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
It is possible when I call clients in the United States, we want a local phone number to appear on the caller ID. For example,
when we call California, we want a California caller ID to appear.

 

How do I set multiple responses for different call outs in this class that implements WebServiceMock?

@isTest
global class PuchaseWSMock_IsTest implements WebServiceMock {
    global void doInvoke(Object stub,
                        Object request,
                        Map<String, Object> response,
                        String endpoint,
                        String soapAction,
                        String requestName,
                        String responseNS,
                        String responseName,
                        String responseType) {
       
        //set response for web service method 1                   
        PurchaseWS.ProgramInfoResponse responseElement = new PurchaseWS.ProgramInfoResponse();
        responseElement.AgreementID = 344;
                            
        response.put('response_x', responseElement);

       //set response for web service method2?
    }
}

 


Test method:
static testMethod void myTest() {
       Test.setMock(WebServiceMock.class, new PurchaseWSMock_IsTest());
       
     Test.startTest();
      //call web service method 1
      //call web service method 2
     Test.startTest();
}

  • October 18, 2013
  • Like
  • 0

Hi,

We are selecting currency datatype for cost which is formula field so how to convert  Dollar to rupees

  • September 08, 2012
  • Like
  • 1