Class RedirectTestBuilderExtensions
Contains extension methods for IRedirectTestBuilder.
Inheritance
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Helpers.dll
Syntax
public static class RedirectTestBuilderExtensions
Methods
| Improve this Doc View SourceTo<TController>(IRedirectTestBuilder, Expression<Action<TController>>)
Tests whether Microsoft.AspNetCore.Mvc.RedirectToActionResult or Microsoft.AspNetCore.Mvc.RedirectToRouteResult redirects to specific action.
Declaration
public static IAndRedirectTestBuilder To<TController>(this IRedirectTestBuilder builder, Expression<Action<TController>> actionCall)where TController : class
Parameters
Type | Name | Description |
---|---|---|
IRedirectTestBuilder | builder | Instance of IRedirectTestBuilder type. |
System.Linq.Expressions.Expression<System.Action<TController>> | actionCall | Method call expression indicating the expected redirect action. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Redirect.IAndRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Redirect.IAndRedirectTestBuilder. |
Type Parameters
Name | Description |
---|---|
TController | Type of expected redirect controller. |
To<TController>(IRedirectTestBuilder, Expression<Func<TController, Task>>)
Tests whether Microsoft.AspNetCore.Mvc.RedirectToActionResult or Microsoft.AspNetCore.Mvc.RedirectToRouteResult redirects to specific asynchronous action.
Declaration
public static IAndRedirectTestBuilder To<TController>(this IRedirectTestBuilder builder, Expression<Func<TController, Task>> actionCall)where TController : class
Parameters
Type | Name | Description |
---|---|---|
IRedirectTestBuilder | builder | Instance of IRedirectTestBuilder type. |
System.Linq.Expressions.Expression<System.Func<TController, System.Threading.Tasks.Task>> | actionCall | Method call expression indicating the expected asynchronous redirect action. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Redirect.IAndRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Redirect.IAndRedirectTestBuilder. |
Type Parameters
Name | Description |
---|---|
TController | Type of expected redirect controller. |