+ Start a Discussion
ayvakayvak 

how to cover below method in test class... help me with example

Hii Guys ...

pls give me some example ... Thanx in advance

Apex class:
 public String getSuggestedServiceDay(GetInstalledServiceWebService.InstalledServiceRecord lst)
    { 
        string retVal='';        
        lstRoute = new LIST<GetInstalledServiceWebService.Route>();
    
        {
            lstRoute = lst.ISRoutes;                
            for (GetInstalledServiceWebService.Route r : lst.ISRoutes)
            {
                if(r.routeDayOfWeek != null && !(r.routeDayOfWeek).equalsIgnoreCase('INVALID'))  
                {   
                    if (retVal != null && retVal.length() > 0)
                    {
                        retVal += ';' + r.routeDayOfWeek.toUpperCase();
                    } 
                    else
                    {
                        retVal = r.routeDayOfWeek.toUpperCase();
                    }
                }       
            }
        }