コード例 #1
0
 private static IMvcFunctionalTestFixture ShouldReturnRedirect(this IMvcFunctionalTestFixture fixture, HttpStatusCode statusCode, string redirectUrl) =>
 fixture.ResponseShould(r => r.StatusCode.Should().Be(statusCode),
                        r => r.Headers.Location.Should().Be(redirectUrl));
コード例 #2
0
 /// <summary>
 /// Adds an assert step that the HTTP response had a success status code i.e. 2xx.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture ShouldReturnSuccessfulStatus(this IMvcFunctionalTestFixture fixture) =>
 fixture.ResponseShould(r => r.EnsureSuccessStatusCode());
コード例 #3
0
 private static IMvcFunctionalTestFixture ShouldReturnStatus(this IMvcFunctionalTestFixture fixture, HttpStatusCode statusCode) =>
 fixture.ResponseShould(r => r.StatusCode.Should().Be(statusCode));