Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 645

The HttpCalloutMock interface enables sending fake responses when testing HTTP callouts in Salesforce.

1 vote
Accepted

Testing a class that has multiple callouts?

Creating a MultiRequest mock class that has a constructor that accepts Map<String, HttpCalloutMock> requests where the map key is the endpoint. … The respond method responds based on the endpoint provided. public class MultiRequestMock implements HttpCalloutMock { Map<String, HttpCalloutMock> requests; public MultiRequestMock(Map<String, HttpCalloutMock
Mohith Shrivastava's user avatar
3 votes
Accepted

HTTP callouts in Batch Apex

The batch size you can keep is 5 .As thats the maximum no of calls allowed per batch context is 10. Small example: String query = 'Select Contact.FirstName,Contact.MobilePhone,Contact.Email,Contact …
Mohith Shrivastava's user avatar
3 votes
Accepted

Test Class with HttpMockCallout is throwing error

Looks like your test class is missing custom setting records for ServiceTokens__c . Create a custom setting record using the same name and add test data on the below lines ServiceTokens__c serviceToke …
Mohith Shrivastava's user avatar