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

Simple trigger test code
I've written this super easy trigger which only sets a date. I'm still learning how to write test code, so I was wondering if anybody could show me what it would be like for something this simple :
trigger SetContractEndDates on Contract_Terms__c (before insert, before update) { for (Contract_Terms__c ct : Trigger.new) { if (ct.Auto_Renewal_Contract_End_Date__c== null) ct.Overall_End_Date__c= ct.Contract_End_Date__c; else ct.Overall_End_Date__c = ct.Auto_Renewal_Contract_End_Date__c; } }
Thank you very much.
Hi,
You can also go through the documentation.
http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods
All Answers
Hi,
You can also go through the documentation.
http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods
Thank you very much Devendra. I really appreciate it.
Glad the solution has worked for you.