public void Can_call_GetFactorial_WebService() { var client = new XmlServiceClient(ListeningOn); var request = new GetFactorial { ForNumber = 3 }; var response = client.Send<GetFactorialResponse>(request); Assert.That(response.Result, Is.EqualTo(GetFactorialService.GetFactorial(request.ForNumber))); }
public async Task Can_call_SendAsync_on_ServiceClient() { var jsonClient = new JsonServiceClient(ListeningOn); var request = new GetFactorial { ForNumber = 3 }; var response = await jsonClient.SendAsync<GetFactorialResponse>(request); Assert.That(response, Is.Not.Null, "No response received"); Assert.That(response.Result, Is.EqualTo(GetFactorialService.GetFactorial(request.ForNumber))); }
public object Any(GetFactorial request) { return(new GetFactorialResponse { Result = GetFactorial(request.ForNumber) }); }
public object Any(GetFactorial request) { return new GetFactorialResponse { Result = GetFactorial(request.ForNumber) }; }