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));
/// <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());
private static IMvcFunctionalTestFixture ShouldReturnStatus(this IMvcFunctionalTestFixture fixture, HttpStatusCode statusCode) => fixture.ResponseShould(r => r.StatusCode.Should().Be(statusCode));