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 332

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

7 votes

how to test a future method which makes callouts?

Here is where Test.startTest() and Test.stopTest() come in to play. Structure your test to do all the data setup, then call startTest(). Execute your tested method and then call StopTest(). Among t …
Kevin P's user avatar
  • 7,268
3 votes

Challenge with unit tests, mock callouts and running as a user

So you want to mix dml inserts and make callouts in your tests? Thats Cray Cray! Here's the low down on how to get around the "You have uncommitted changes pending please commit or rollback…" when tr …
Kevin P's user avatar
  • 7,268