+ Start a Discussion
Rajkumar CV 12Rajkumar CV 12 

Please help me in writing Test class for the below code

List<Case> localemailaddress = new List<Case>([SELECT ID,AV_Local_Affiliate_Inbox__c FROM Case Where Id IN : newCaseMap.keySet()]);
if(localemailaddress.size()>0 && localemailaddress!=null&&localemailaddress.get(0).AV_Local_Affiliate_Inbox__c!=null){
String affiliateemail=String.valueOf(localemailaddress.get(0).AV_Local_Affiliate_Inbox__c);

Please let me know it is very urgent.
Rajkumar CV 12Rajkumar CV 12
The affiliateemail is always passing null value while test class is getting executed.
Hi Rajkumar,

Are you sure that you have value in the newCaseMap.keySet()?

Rajkumar CV 12Rajkumar CV 12
Yes , I had a debug statement written. It passes the value every time. Thanks.