/// <summary> /// Adds assertions that will be run on the HTTP, JSON response body. /// </summary> /// <typeparam name="TModel">The type of the result.</typeparam> /// <param name="fixture">The fixture.</param> /// <param name="assertions">The assertions.</param> /// <returns></returns> public static IMvcFunctionalTestFixture ShouldReturnJson <TModel>(this IMvcFunctionalTestFixture fixture, params Action <TModel>[] assertions) => fixture.ShouldReturnBody(JsonConvert.DeserializeObject <TModel>, assertions);
/// <summary> /// Adds assertions that will be run on the HTTP, raw response body. /// </summary> /// <param name="fixture">The fixture.</param> /// <param name="assertions">The assertions.</param> /// <returns></returns> public static IMvcFunctionalTestFixture ShouldReturnRaw(this IMvcFunctionalTestFixture fixture, params Action <string>[] assertions) => fixture.ShouldReturnBody(x => x, assertions);