+ Start a Discussion

code coverage in else

else if line is getting covered and is shown in blue/green, but the next two lines are in red. How to get that covered?
} else if ((checkedSummaryPlanIds == totalSummaryPlanIds) && (planIdMatch == false)) {
      skippedRecords += ddRecs.Plan_id__c + ' - ' + ddRecs.account_name__c + '\n'; // concatinated list of skipped records plan ids

Best Answer chosen by Colbridge
AbhinavAbhinav (Salesforce Developers) 
that means its checking your condition if ((checkedSummaryPlanIds == totalSummaryPlanIds) && (planIdMatch == false))  but its not getting true so other two lines are not covered.

Add you test data in sych way that else if conditions evaluates to be true.