public HelloWorldOutput HelloWorld(HelloWorldInput input) { try { // My Code return(new HelloWorldOutput()); } catch (Exception ex) { throw new SoapException("Hello World Exception", SoapException.ServerFaultCode, "HelloWorld", ex); } }
public void HelloWorldTest() { var input = new HelloWorldInput { Name = "Alan" }; Assert.IsTrue(input.IsValid()); var result = ServiceFactory.Sample().HelloWorld(input); Assert.IsTrue(result.ReturnValue == HelloWorldOutput.Returns.Ok); Console.WriteLine(result.ResultData.WelcomMessage); }