Skip to main content
added 28 characters in body
Source Link
Sergej Utko
  • 22.1k
  • 11
  • 60
  • 88

Saw this on another post, have not tested it.

if (!System.Test.isRunningTest()) { WebServiceCallout.invoke(...) } else { // Simulate callout here... }

if (!System.Test.isRunningTest()) {
    WebServiceCallout.invoke(...)
} 
else {
  // Simulate callout here...
}

Saw this on another post, have not tested it.

if (!System.Test.isRunningTest()) { WebServiceCallout.invoke(...) } else { // Simulate callout here... }

Saw this on another post, have not tested it.

if (!System.Test.isRunningTest()) {
    WebServiceCallout.invoke(...)
} 
else {
  // Simulate callout here...
}
Source Link

Saw this on another post, have not tested it.

if (!System.Test.isRunningTest()) { WebServiceCallout.invoke(...) } else { // Simulate callout here... }