URGENT : Regarding If Condition in test class for trigger.
Hi All,
It's Very urgent !!
Can anyone help to write a test class for below code.
Need to satisfy if condition.I created 2 records of an object with Akreos_MIL__c = 220 and Akreos_MIL__c = 210. but, it;s not working to increase code coverage.
if (trigger.OldMap.get(pv.Id).Akreos_MIL__c != pv.Akreos_MIL__c) {
You need to test only one record, such as:
This will test your conditional branch, assuming the trigger uses "before update" or "after update" events.