public void Can_GetFactorial() { var request = new GetFactorial { ForNumber = 4 }; SendToEachEndpoint<GetFactorialResponse>(request, response => Assert.That(response.Result, Is.EqualTo(24))); }
public void GetFactorial_Test() { var request = new GetFactorial { ForNumber = 4 }; var handler = new GetFactorialService(); var response = (GetFactorialResponse)handler.Execute(request); Assert.That(response.Result, Is.EqualTo(4 * 3 * 2 * 1)); }