MY TESTED ASP.NET CORE MVC DOCS
Show / Hide Table of Contents

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 Source

MyController()

Initializes a new instance of the MyController<TController> class.

Declaration
public MyController()
| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Instance()

Starts a controller test.

Declaration
public static IControllerBuilder<TController> Instance()
Returns
Type Description
IControllerBuilder<TController>

Test builder of IControllerBuilder<TController> type.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Extension Methods

ComponentBuilderSessionExtensions.WithSession<IAndControllerBuilder<TController>>(Action<ISessionBuilder>)
ComponentBuilderDependencyInjectionExtensions.WithServices<IAndControllerBuilder<TController>>(Action<IServicesBuilder>)
ComponentBuilderDependencyInjectionExtensions.WithServices<IAndControllerBuilder<TController>>(IEnumerable<Object>)
ComponentBuilderDependencyInjectionExtensions.WithServices<IAndControllerBuilder<TController>>(Object[])
ComponentBuilderHttpExtensions.WithHttpContext<IAndControllerBuilder<TController>>(HttpContext)
ComponentBuilderHttpExtensions.WithHttpContext<IAndControllerBuilder<TController>>(Action<HttpContext>)
ComponentBuilderHttpExtensions.WithHttpRequest<IAndControllerBuilder<TController>>(HttpRequest)
ComponentBuilderHttpExtensions.WithHttpRequest<IAndControllerBuilder<TController>>(Action<IHttpRequestBuilder>)
ComponentBuilderCachingExtensions.WithMemoryCache<IAndControllerBuilder<TController>>(Action<IMemoryCacheBuilder>)
ComponentBuilderOptionsExtensions.WithOptions<IAndControllerBuilder<TController>>(Action<IOptionsBuilder>)
ComponentBuilderRoutingExtensions.WithRouteData<IAndControllerBuilder<TController>>()
ComponentBuilderRoutingExtensions.WithRouteData<IAndControllerBuilder<TController>>(Object)
ComponentBuilderAuthenticationExtensions.WithAuthenticatedUser<IAndControllerBuilder<TController>>()
ComponentBuilderAuthenticationExtensions.WithAuthenticatedUser<IAndControllerBuilder<TController>>(Action<IClaimsPrincipalBuilder>)
ComponentBuilderEntityFrameworkCoreExtensions.WithDbContext<IAndControllerBuilder<TController>>(Action<IDbContextBuilder>)
ControllerBuilderDataAnnotationsExtensions.WithoutValidation<TController>()
ComponentBuilderTempDataExtensions.WithTempData<IAndControllerBuilder<TController>>(Action<ITempDataBuilder>)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX