public void Can_GetFibonacciNumbers() { var request = new GetFibonacciNumbers { Skip = 3, Take = 5 }; SendToEachEndpoint<GetFibonacciNumbersResponse>(request, response => Assert.That(response.Results, Is.EquivalentTo(new List<long> { 5, 8, 13, 21, 34 }))); }
public void GetFibonacciNumbers_Test() { var request = new GetFibonacciNumbers { Take = 5 }; var handler = new GetFibonacciNumbersService( new ExampleConfig { DefaultFibonacciLimit = 10 }); var response = (GetFibonacciNumbersResponse) handler.Execute(request); Assert.That(response.Results.Count, Is.EqualTo(request.Take)); Assert.That(response.Results, Is.EqualTo(new[] { 1, 2, 3, 5, 8 })); }