Class MyController<TController>
Provides methods to specify an ASP.NET Core MVC controller test case.
Inheritance
System.Object
MyTested.AspNetCore.Mvc.Builders.Base.BaseTestBuilder
MyTested.AspNetCore.Mvc.Builders.Base.BaseTestBuilderWithComponent
MyTested.AspNetCore.Mvc.Builders.Base.BaseTestBuilderWithComponentBuilder<MyTested.AspNetCore.Mvc.Builders.Contracts.Controllers.IAndControllerBuilder<TController>>
MyTested.AspNetCore.Mvc.Builders.Components.BaseComponentBuilder<TController, MyTested.AspNetCore.Mvc.Internal.TestContexts.ControllerTestContext, MyTested.AspNetCore.Mvc.Builders.Contracts.Controllers.IAndControllerBuilder<TController>>
MyTested.AspNetCore.Mvc.Builders.Controllers.ControllerBuilder<TController>
MyController<TController>
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public class MyController<TController> : ControllerBuilder<TController>, IAndControllerBuilder<TController>, IControllerBuilder<TController>, IBaseTestBuilderWithComponentBuilder<IAndControllerBuilder<TController>>, IBaseTestBuilderWithComponent, IBaseTestBuilder where TController : class
Type Parameters
Name | Description |
---|---|
TController | Type of ASP.NET Core MVC controller to test. |
Constructors
| Improve this Doc View SourceMyController()
Initializes a new instance of the MyController<TController> class.
Declaration
public MyController()
MyController(TController)
Initializes a new instance of the MyController<TController> class.
Declaration
public MyController(TController controller)
Parameters
Type | Name | Description |
---|---|---|
TController | controller | Instance of the ASP.NET Core MVC controller to test. |
MyController(Func<TController>)
Initializes a new instance of the MyController<TController> class.
Declaration
public MyController(Func<TController> construction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TController> | construction | Construction function returning the instantiated controller. |
Methods
| Improve this Doc View SourceInstance()
Starts a controller test.
Declaration
public static IControllerBuilder<TController> Instance()
Returns
Type | Description |
---|---|
IControllerBuilder<TController> | Test builder of IControllerBuilder<TController> type. |
Instance(TController)
Starts a controller test.
Declaration
public static IControllerBuilder<TController> Instance(TController controller)
Parameters
Type | Name | Description |
---|---|---|
TController | controller | Instance of the ASP.NET Core MVC controller to test. |
Returns
Type | Description |
---|---|
IControllerBuilder<TController> | Test builder of IControllerBuilder<TController> type. |
Instance(Func<TController>)
Starts a controller test.
Declaration
public static IControllerBuilder<TController> Instance(Func<TController> construction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TController> | construction | Construction function returning the instantiated controller. |
Returns
Type | Description |
---|---|
IControllerBuilder<TController> | Test builder of IControllerBuilder<TController> type. |