public void OddNumber(BigInteger number) { var request = GenerateHttpRequest(number); var response = OddOrEven.Run(request, logger); Assert.IsType <OkObjectResult>(response); Assert.Equal("Odd", ((OkObjectResult)response).Value as string); }
public void NonNumbers() { string nonNumber = "I'm Even"; var request = GenerateHttpRequest(nonNumber); var response = OddOrEven.Run(request, logger); Assert.IsType <BadRequestObjectResult>(response); Assert.Contains("Unable to parse", ((BadRequestObjectResult)response).Value as string); }