You need to sign in to do that
Don't have an account?
sfdc_dane
Test Coverage Help
Any idea how to get a 100% testcov of this get set method?
public List<Job_Offer__c> jobOfferList
{
get{
jobOfferList = [Column1, Column2, Column3
From Job_Offer__c
Where Job__c =: jobId And (Status__c = 'Rejected' Or Status__c = 'Timed Out')
ORDER BY CreatedDate];
return jobOfferList;
}
set;
}
Try this way-
static testmethod void test()
{
ABC obj=new ABC();
List<Job_Offer__c> templist=obj.jobofferlist;
}
All Answers
Set and Get the value of jobOfferList in your test class and it will give you 100% code coverage.
Sorry.. can u give me an example? thx
Try this way-
static testmethod void test()
{
ABC obj=new ABC();
List<Job_Offer__c> templist=obj.jobofferlist;
}
Hi UV,
Awesome!! It works perfectly!! thx for the help! =D