コード例 #1
0
 /// <summary>
 /// Adds an assert step that the HTTP response had a bad request (400) status code.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture ShouldReturnBadRequest(this IMvcFunctionalTestFixture fixture)
 => fixture.ShouldReturnStatus(HttpStatusCode.BadRequest);
コード例 #2
0
 /// <summary>
 /// Adds an assert step that the HTTP response had a internal server error (500) status code.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture ShouldReturnInternalServerError(this IMvcFunctionalTestFixture fixture)
 => fixture.ShouldReturnStatus(HttpStatusCode.InternalServerError);
コード例 #3
0
 /// <summary>
 /// Adds an assert step that the HTTP response had a forbidden (403) status code.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture ShouldReturnForbidden(this IMvcFunctionalTestFixture fixture)
 => fixture.ShouldReturnStatus(HttpStatusCode.Forbidden);
コード例 #4
0
 /// <summary>
 /// Adds an assert step that the HTTP response had a not found (404) status code.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture ShouldReturnNotFound(this IMvcFunctionalTestFixture fixture)
 => fixture.ShouldReturnStatus(HttpStatusCode.NotFound);
コード例 #5
0
 /// <summary>
 /// Adds an assert step that the HTTP response had an unauthorized (401) status code.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture ShouldReturnUnauthorized(this IMvcFunctionalTestFixture fixture)
 => fixture.ShouldReturnStatus(HttpStatusCode.Unauthorized);