function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mohammed ArshadMohammed Arshad 

Test class to cover the list methods

public with sharing class IS_Retailer{        
    public Decimal TotalCount;
    public IS_Retailer() {
    }

    public List<IS_Checker> check(IS_Retail retail) {
        List<IS_Checker> checkErrors = new List<IS_Checker>();
        if(retail.app.Total_Cash__c < 1000){
            IS_Checker ive = new IS_Checker('check Application', 'Cash is less than 1000');
            checkErrors.add(ive);
        }
        checkErrors.addAll(checkIsAvailable(retail.soapList1,'Atleast 1 ABC is required'));
        checkErrors.addAll(checkIsAvailable(retail.foamList1,'Atleast 1 XYZ is required'));
        if(retail.applicant2 != null){
            checkErrors.addAll(checkIsAvailable(retail.foamList2,'Atleast 1 ABC is required.'));
            checkErrors.addAll(checkIsAvailable(retail.soapList2,'Atleast 1 XYZ is required'));
        }
        Id appId = ApexPages.currentPage().getParameters().get('id');
        List<AggregateResult> groupedResults = [select Count(Application__r.Checker_Count__c) plan,SUM(No_of_Checker_Plans__c) aver from Checker__c where Application__c = :appId];
        Object chplan = groupedResults[0].get('plan');
        Object chCount = groupedResults[0].get('aver');               
        TotalCount = (integer)chplan + (Decimal)chCount;
       if(TotalCount > 30){
        IS_Checker ive = new IS_Checker('', 'Exceeded maximum number of allowed Checks (30)');
            checkErrors.add(ive);
        }
        if((retail.app.Sync__c != true && !retail.app.Code__c.contains('ERR')) && !retail.app.Docs__c){      
            checkErrors.add(new IS_Checker('','Application is updated.'));
        }
        return checkErrors; 
    }    


    public List<IS_Checker> checkIsAvailable(List<SObject> objList, String err) {
        List<IS_Checker> checkErrors = new List<IS_Checker>();
        
        if(objList != null){
            if(objList.isEmpty()){
               IS_Checker ive = new IS_Checker('check Application', err);
               checkErrors.add(ive);           
            }
        }
        return checkErrors;
    }
    
}
 
Raj VakatiRaj Vakati
try this code and update as per comments 
 
@IsTest
private class IS_RetailerTest {


@isTest
private static void IS_Retailer_Test() {
 Test.startTest();
Checker__c  c = new Checker__c ();
c.Name='Demo';
// add other fields
insert c ;


Application__c  app = new Application__c ();
//add other fields 
insert app ;

PageReference myVfPage = Page.YOUR PAGE;
Test.setCurrentPage(myVfPage);

// Put Id into the current page Parameters
ApexPages.currentPage().getParameters().put('id',app.id);
IS_Retail retWraper = new IS_Retail ();
//Set all values to retWraper;

IS_Retailer ret = new IS_Retailer();
ret.check(retWraper);
ret.checkIsAvailable(new List<Sobject>{app},'Error'});
   Test.stopTest(); 
}
}