public void NullRequest() { _svc.Awaiting(x => x.GetRouteMiles(null)) .Should() .Throw <Exception>() .WithMessage("Invalid number of stops. Must provide 2 or more stops."); }
public void BadRequest() { MockHttpResponse("", HttpStatusCode.BadRequest); var request = new MileageRequestData { OriginCity = "O_City", OriginState = "O_State", OriginCountry = "O_Country", OriginPostalCode = "O_PostalCode", DestinationCity = "D_City", DestinationState = "D_State", DestinationCountry = "D_Country", DestinationPostalCode = "D_PostalCode", DefaultMiles = 0 }; _svc.Awaiting(x => x.GetDirectRouteMiles(request)) .Should() .Throw <Exception>() .WithMessage("*Bad Request*"); }