You need to sign in to do that
Don't have an account?
Sandeep TechAffinity
How to solve Test Class covering issue?
Hi Guys,
I have a Test Class issue can anyone tell me the mistake. I have custom filed "ClinicCode" in the Lead object. I am not passing the code in the test class but the lead is stored under the "leadsWithClinicsList" list. It should be in "leadsWithOutClinicsList"
I have a Test Class issue can anyone tell me the mistake. I have custom filed "ClinicCode" in the Lead object. I am not passing the code in the test class but the lead is stored under the "leadsWithClinicsList" list. It should be in "leadsWithOutClinicsList"
Try this:
All Answers
Try this:
As Bryan suggested, use !String.isBlank(led.Clinic_Code__c) or led.Clinic_Code__c !=null in the if statement.
And also check the Clinic_Code__c is a formula field or not. If it is a formula then make sure this field should should be empty in your test class.
If this helps, Please mark it as best answer.
Thanks!!
First issue was you are using null that's wrong insted of you need to use blank ('')
Second You need to Call 2 time same methos -->>>first method will have Clinic_Account__c = '' and Second method should not blank Clinic_Account__c
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh