Skip to main content
2 of 4
added 2 characters in body
Ratan Paul
  • 22.8k
  • 14
  • 55
  • 99

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