Could anyone give me a guide or example of how to test the web service
Here is my web service but i don't know how to write the test for it
public class Service{
private string m_ERR_NO_LISTIN G= "No data found";
private static readonly ILog log = LogManager.GetL ogger(typeof(Se rvice));
[WebMethod]
public com.xignite.www.Category [] GetCategoriesAn dTopics()
{
com.xignite.www.Category[] ArrayOfCategory = null;
try
{
ArrayOfCategory = Service.GetCate goriesAndTopics ();
}
catch(Exception e) {
log.Error("Invo ke GetCategoriesAn dTopics operation failed", e);
throw new SoapException(e .Message, SoapException.S erverFaultCode) ;
}
if (ArrayOfCategor y!=null && ArrayOfCategory .Length>0 &&
ArrayOfCategory[0]!=null)
{
if (IsOutcomeResul tFailed(ArrayOf Category[0]))
{
throw new SoapException(A rrayOfCategory[0].Message,
SoapException.S erverFaultCode) ;
}
}
if(ArrayOfCateg ory==null ||ArrayOfCatego ry.Length==0 ||
ArrayOfCategory[0]==null)
{
throw new SoapException(m _ERR_NO_LISTING ,
SoapException.S erverFaultCode) ;
}
return ArrayOfCategory ;
}
private bool IsOutcomeResult Failed(com.xign ite.www.Common common)
{
return common!=null && common.Outcome!
=com.xignite.www.OutcomeTypes.Success;
}
}