public void WebServiceDemoServicesHelloWorldReturnNotEmptyMsTestTest() { var svs = new WebServices.Proxy.DemoServices(); string actual = svs.HelloWorld(); Assert.IsTrue(!string.IsNullOrEmpty(actual), "Empty string returned"); }
public void WebServiceDemoServicesHelloWorldReturnHelloUsersMessageMsTestTest() { var svs = new WebServices.Proxy.DemoServices(); string msg = svs.HelloWorld(); Assert.IsTrue(msg.StartsWith(@"Hello users of"), "Wrong string returned"); }
public void WebServiceDemoServicesGetCustomersThrowsPreconditionExceptionMsTestAndNUnitTest() { var svs = new WebServices.Proxy.DemoServices(); Assert.That(svs.GetCustomers, Throws.TypeOf(typeof(WebServiceException)). With.Message.EqualTo("Error while getting customers!"), "Wrong exception or exception message returned!"); //NUnit }
public void WebServiceDemoServicesHelloWorldReturnMessageWithPatternMsTestAndNUnitTest() { var svs = new WebServices.Proxy.DemoServices(); string msg = svs.HelloWorld(); Assert.That(msg, Does.Match(@"^Hello\susers\sof\s(?<AppName>[A-Za-z]*){1};"), "Wrong string returned"); //NUnit }