Class CreatedTestBuilderExtensions
Contains extension methods for ICreatedTestBuilder.
Inheritance
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Helpers.dll
Syntax
public static class CreatedTestBuilderExtensions
Methods
| Improve this Doc View SourceAt<TController>(ICreatedTestBuilder, Expression<Action<TController>>)
Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult returns created at specific action.
Declaration
public static IAndCreatedTestBuilder At<TController>(this ICreatedTestBuilder builder, Expression<Action<TController>> actionCall)where TController : class
Parameters
Type | Name | Description |
---|---|---|
ICreatedTestBuilder | builder | Instance of ICreatedTestBuilder type. |
System.Linq.Expressions.Expression<System.Action<TController>> | actionCall | Method call expression indicating the expected action. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder. |
Type Parameters
Name | Description |
---|---|
TController | Type of expected controller. |
At<TController>(ICreatedTestBuilder, Expression<Func<TController, Task>>)
Tests whether Microsoft.AspNetCore.Mvc.CreatedAtActionResult or Microsoft.AspNetCore.Mvc.CreatedAtRouteResult returns created at specific asynchronous action.
Declaration
public static IAndCreatedTestBuilder At<TController>(this ICreatedTestBuilder builder, Expression<Func<TController, Task>> actionCall)where TController : class
Parameters
Type | Name | Description |
---|---|---|
ICreatedTestBuilder | builder | Instance of ICreatedTestBuilder type. |
System.Linq.Expressions.Expression<System.Func<TController, System.Threading.Tasks.Task>> | actionCall | Method call expression indicating the expected asynchronous created action. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Created.IAndCreatedTestBuilder. |
Type Parameters
Name | Description |
---|---|
TController | Type of expected controller. |