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 questions only not deleted user 18269

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

8 votes
1 answer
2k views

How can I unit test a http callout that uses a certificate?

The .setClientCertificateName method of the HttpRequest class requires a string that is the name of a certificate in the organization. In a unit test class, is it possible to mock this method? When I …
Renato Oliveira's user avatar
0 votes
1 answer
392 views

How can I mock Twilio's Apex callout to send a SMS?

The official documentation from Twilio does not specify how to mock the calls from their managed package (with namespace "TwilioSF"). How can I mock a callout like this one? TwilioSF.TwilioApiClient a …
Renato Oliveira's user avatar