+ Start a Discussion
udayarangareddy mekalaudayarangareddy mekala 

Trigger test class12112

Hi
how to cover the below trigger code for testclass

        for(Account newvals : Trigger.new){
         
                for(Account oldvals : trigger.old){

                list<Account>acc1 = new <Account>();
                        Account acc = new Account();                              
                        acc.Field__c = 'priority';                              
                       acc.New_Value__c= newvals.priority;                              
                      acc.Old_Value__c= oldvals.Priority;                                                           
                  acc1.add(acc);
}
  }

Thanks&Regards
Ranga
 
Gyanender SinghGyanender Singh
Hi udayarangareddy,

Can you post your whole code and just little bit describe your functionality of your trigger..

Thanks 
Gyani.
Pankaj GangpariaPankaj Gangparia
Inser account in test class

Account acc =new Accont();
acc.Name = 'name';
insert acc;