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

Please help me in writing a test class for a trigger helper class
Please help me in writing a test class for a trigger helper class for below code:-
public class DiscountTriggerHelper {
public static void beforeTrigApplyDiscount(List<Discount__c> discounts){
for(Discount__c disc : discounts){
If(disc.Discount_Applied__c == false && disc.Amount__c >= 100){
disc.Amount__c = disc.Amount__c + 10;
disc.Discount_Applied__c = true;
}
}
}
}
public class DiscountTriggerHelper {
public static void beforeTrigApplyDiscount(List<Discount__c> discounts){
for(Discount__c disc : discounts){
If(disc.Discount_Applied__c == false && disc.Amount__c >= 100){
disc.Amount__c = disc.Amount__c + 10;
disc.Discount_Applied__c = true;
}
}
}
}
Thank You!
All Answers
Thank You!