/// <inheritdoc /> public IAndRedirectTestBuilder ContainingRouteValueOfType <TRouteValue>() { RouteActionResultValidator.ValidateRouteValueOfType <TRouteValue>( this.ActionResult, this.ThrowNewRedirectResultAssertionException); return(this); }
/// <inheritdoc /> public IAndCreatedTestBuilder ContainingRouteValueOfType <TRouteValue>() { RouteActionResultValidator.ValidateRouteValueOfType <TRouteValue>( this.TestContext.MethodResult, this.ThrowNewCreatedResultAssertionException); return(this); }
/// <inheritdoc /> public IAndCreatedTestBuilder ContainingRouteValueOfType <TRouteValue>(string key) { RouteActionResultValidator.ValidateRouteValueOfType <TRouteValue>( this.ActionResult, key, this.ThrowNewCreatedResultAssertionException); return(this); }
/// <summary> /// Tests whether the <see cref="Microsoft.AspNetCore.Mvc.ActionResult"/> /// contains specific route value of the given type. /// </summary> /// <param name="baseTestBuilderWithRouteValuesResult"> /// Instance of <see cref="IBaseTestBuilderWithRouteValuesResult{TRouteValuesResultTestBuilder}"/> type. /// </param> /// <returns>The same route values <see cref="Microsoft.AspNetCore.Mvc.ActionResult"/> test builder.</returns> public static TRouteValuesResultTestBuilder ContainingRouteValueOfType <TRouteValuesResultTestBuilder, TRouteValue>( this IBaseTestBuilderWithRouteValuesResult <TRouteValuesResultTestBuilder> baseTestBuilderWithRouteValuesResult) where TRouteValuesResultTestBuilder : IBaseTestBuilderWithActionResult { var actualBuilder = GetActualBuilder(baseTestBuilderWithRouteValuesResult); RouteActionResultValidator.ValidateRouteValueOfType <TRouteValue>( actualBuilder.TestContext.MethodResult, actualBuilder.ThrowNewFailedValidationException); return(actualBuilder.ResultTestBuilder); }