Skip to main content
1 of 4
Priyalakshmi
  • 1.5k
  • 2
  • 21
  • 40

how to write a test class for trigger that calls future method?

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

Priyalakshmi
  • 1.5k
  • 2
  • 21
  • 40