public string main(string url)
{
Http h= new Http();
HttpRequest req= new HttpRequest();
req.setEndpoint(url);
req.setMethod('GET');
req.setTimeout(60000);
string hresult='';
if(isValid==true)
{
HttpResponse hres= h.send(req);
hresult = hres.getBody();
system.debug('syssss'+hres);
system.debug('sysst' +hresult);
}else{
hresult = '<?xml version="1.0" encoding="ISO-8859-1"?><HelpTextDetails><HelpTab TabName="C&P InvoicePayment" label="C&P InvoicePayment"></HelpTab></HelpTextDetails>';
}
return hresult;
}
My Test Class is
public static testmethod void helptest(){
helptex hc = new helpTex();
hc.isValid = true;
hc.main('https://s3.amazonaws.com/clickandpledge/Salesforce/Help/Help.XML');
}
This is not covering this part
hresult = hres.getBody();
return result
Once this part is covered,I can cover the another method which is referred to this method.What should I do to cover this part also