public async void Must_use_response_of_route_with_most_matching_restrictions() { ResponseResult result = await _generator.GetResponseAsync(_context, _routeMatchResults); Assert.That(result.CacheKey, Is.EqualTo(_route2.Id.ToString())); Assert.That(result.ResultType, Is.EqualTo(ResponseResultType.ResponseGenerated)); Assert.That(await result.Response, Is.SameAs(_route2Response)); }
public async void Must_generate_multiple_choices_response() { ResponseResult result = await _generator.GetResponseAsync(_context, _routeMatchResults); Assert.That(result.CacheKey, Is.Null); Assert.That(result.ResultType, Is.EqualTo(ResponseResultType.ResponseGenerated)); Assert.That((await result.Response).StatusCode.ParsedStatusCode, Is.EqualTo(HttpStatusCode.MultipleChoices)); }
public async void Must_use_response_of_route_with_most_matching_restrictions() { ResponseResult result = await _generator.GetResponseAsync(_context, Enumerable.Empty <RouteMatchResult>()); Assert.That(result.ResultType, Is.EqualTo(ResponseResultType.ResponseNotGenerated)); }