trigger CaseTri on Case (after insert) {
if(Trigger.isAfter){
if(Trigger.isUpdate){
if(classA.Method1){
webServices.notify(Trigger.New[0].Id);
ClassA.Method1 = true;
}
}
if(Trigger.isAfter){
if(Trigger.isInsert){
if(ClassA.method1) {
webservice.CcNotification(Trigger.New[0].Id);
ClassA.method1 = true;
}
}
}
webservice.CcNotification(Trigger.New[0].Id);
->line which calls future method
My testclass:
@isTest(SeeAllData=true)
public class CaseTri{
public static testMethod void testnotif(){
Case c = new Case();
insert c;
Test.startTest();
Test.setMock(WebServiceMock.class, new WebServiceMockImplnotif());
Test.stopTest();
}
}
SeeAllData=true
. Mock all sobjects and custom settings that your test needs. You or your successor will appreciate this effort when it comes time to do deployment