You need to sign in to do that
Don't have an account?
Shikha Raheja
Not able to make second mock callout
Hi. I have a test class that makes a mock REST API callout . Now,I need to make another callout in test class and the response body would be response received from first mock callout. The first callout is made and correct response is returned . However,I am unable to use the response returned as body for another mock callout. This comes out to be null. How can I accomplish this? Has anyone encountered a scenario like this.
Are you saying that you are using same mock class in differrent method and you are getting the response as Null.
(OR)
In the same test method you are calling two callouts and one mock class is used
For thid scenario : Try to call one callout on one test method and use same mock class and issue will be resolved.
If any of my assumed scenarios are not matched with your scenario. Post your whole scenario clearly with a code snippet.
It will be helpful for me to understand