You need to sign in to do that
Don't have an account?

How to write Test class for this trigger
Trigger addtrigger on Quote__c(before insert, before update) { if(Trigger.isBefore) { if (Trigger.isInsert || Trigger.isUpdate) { for(Quote__c cob : trigger.new) { cob.Total_Job_Value_Updated__c= cob.H_Total_Job_Value__c+cob.Delivery_Charges_n__c; } } } }
Hope below code will help you for unit test class
please check this below code which is testing bulk record scenation with asert statements.
I have checked your code and updated few things on Assert and DML operation