+ Start a Discussion
GauravTrivediGauravTrivedi 

Test Class for standard set controller

I was trying to cover my controller class where I used standard set controller but I stuck to cover the folowing code;
 
public Integer opportunityTotalPage{
        get {
            integer total = 0;
            integer totalResults = StdSetControllerOpportunity.getResultSize();
            if (totalResults > 0){
                total = 1;                  
                if (totalResults > StdSetControllerOpportunity.getPageSize()){
                    total = totalResults / StdSetControllerOpportunity.getPageSize();
                    integer remainder = Math.mod(totalResults,StdSetControllerOpportunity.getPageSize());
                    if (remainder > 0){ total++; }                    
                }
            }
            return total;
        }
        set;
    }

If anyone have any Idea please help me out. Tks!