You need to sign in to do that
Don't have an account?
Apurv Saxena
Thanks in advance
Apex Specialist Challange 4 : Unable to cover my methods
@isTest public class MaintenanceRequesTest { @isTest static void testMaintenanceRequest(){ List<case> caseList1 = new List<case>(); List<case> caseList2 = new List<case>(); for(Integer i=0;i<200;i++){ Case c = new Case(); c.Status = 'Closed'; c.Type = 'Repair'; c.Vehicle__c = c.Id; caseList1.add(c); } for(Integer j=0;j<200;j++){ Case c = new Case(); c.Status = 'Closed'; c.Type = 'Routine Maintenance'; c.Vehicle__c = c.Id; caseList2.add(c); } caseList1.addAll(caseList2); if(caseList1.size()>0){ insert caseList1; } } }This is my test class for Maintenance Request but I am unable to increase my code coverage. Please help me in clearing this challenge.
Thanks in advance
Please refer below link where the code has been posted for test class and cross check with yours.
http://salesforce.stackexchange.com/questions/130242/superbadges-apex-specialist-the-maintenancerequest-trigger-does-not-appear
Hope this helps you!
Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards
Sandhya