Search Results
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 |
The HttpCalloutMock interface enables sending fake responses when testing HTTP callouts in Salesforce.
3
votes
Accepted
How to confirm one of many HttpCalloutMock has been used
System.assert(cm1.isCalled);
Edit :Based on your updated code:
public without sharing class MultiRequestMock implements HttpCalloutMock {
public Map<String, HttpCalloutMock> requests;
public … req) {
HttpCalloutMock mock = requests.get(req.getEndpoint());
usedEndpoints.add(req.getEndpoint());
if (mock ! …
4
votes
Accepted
System.XmlException: start tag unexpected character =
There are few things wrong with the xml.
1) In Apex, the string starts and end with single quotes ' , thus you don't need to escape "
2) You cannot use & in XML, it makes XML invalid, you have to es …