• Jhon Cortes 7
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I am hit with other issue 'Ensure that page performance is improved by only rerendering the table and error messages when a use clicks the Add button.' I have used actionRegion to rerender the needed table,chart and messages.still it shows issues.
Hi,

I am trying to learn module "Using CSS and JavaScript Mobile Frameworks" in Visualforce Trailhead. However, even after following the instructions in the module, I am unable to get any output. My preview window is blank. Does anyone else face this problem. Please help.

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