You need to sign in to do that
Don't have an account?
sfdc18
Test class for Trigger which calls @future method
Hi,
How to write a test class for trigger which calls @future method
for eg.
trigger AccountCallout on Account (after insert) {
for (Account a : Trigger.new) {
WebServiceCallout.sendNotification(a.Id);
}
}
How to write a test class for trigger which calls @future method
for eg.
trigger AccountCallout on Account (after insert) {
for (Account a : Trigger.new) {
WebServiceCallout.sendNotification(a.Id);
}
}
http://salesforce.stackexchange.com/questions/325/how-do-you-write-a-unit-test-for-a-trigger-whose-only-function-is-to-make-a-call
thanks
Shaijan
Try this
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_invoking_future_methods.htm
I tried link provided by Cloud Rocky.
I get below error
Methods defined as TestMethod do not support Web service callouts, test skipped