I have a case where i have to test Webservices methods which do not have HTTPContext as method parameters, but uses HTTPContext whcih comes from the browser inside the method.It is something like below:
[WebMethod()]
{
string result = String.Empty;
try
{
result = new AnotherClass().anotherMethod(classB.UserName(Context));
}
catch (Exception e)
{
throw new WebServiceException(e);
}
return result;
}


Rajkiran SwainRank #165 · 14.4K reputationPosted Dec 28, 2017, 4:35 AM EST