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

Class MyViewComponent<TViewComponent>

Provides methods to specify an ASP.NET Core MVC view component 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.ViewComponents.IAndViewComponentBuilder<TViewComponent>>
MyTested.AspNetCore.Mvc.Builders.Components.BaseComponentBuilder<TViewComponent, MyTested.AspNetCore.Mvc.Internal.TestContexts.ViewComponentTestContext, MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponents.IAndViewComponentBuilder<TViewComponent>>
MyTested.AspNetCore.Mvc.Builders.ViewComponents.ViewComponentBuilder<TViewComponent>
MyViewComponent<TViewComponent>
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.ViewComponents.dll
Syntax
public class MyViewComponent<TViewComponent> : ViewComponentBuilder<TViewComponent>, IAndViewComponentBuilder<TViewComponent>, IViewComponentBuilder<TViewComponent>, IBaseTestBuilderWithComponentBuilder<IAndViewComponentBuilder<TViewComponent>>, IBaseTestBuilderWithComponent, IBaseTestBuilder where TViewComponent : class
Type Parameters
Name Description
TViewComponent Type of ASP.NET Core MVC view component to test.

Constructors

| Improve this Doc View Source

MyViewComponent()

Initializes a new instance of the MyViewComponent<TViewComponent> class.

Declaration
public MyViewComponent()
| Improve this Doc View Source

MyViewComponent(TViewComponent)

Initializes a new instance of the MyViewComponent<TViewComponent> class.

Declaration
public MyViewComponent(TViewComponent viewComponent)
Parameters
Type Name Description
TViewComponent viewComponent

Instance of the ASP.NET Core MVC view component to test.

| Improve this Doc View Source

MyViewComponent(Func<TViewComponent>)

Initializes a new instance of the MyViewComponent<TViewComponent> class.

Declaration
public MyViewComponent(Func<TViewComponent> construction)
Parameters
Type Name Description
System.Func<TViewComponent> construction

Construction function returning the instantiated view component.

Methods

| Improve this Doc View Source

Instance()

Starts a view component test.

Declaration
public static IViewComponentBuilder<TViewComponent> Instance()
Returns
Type Description
IViewComponentBuilder<TViewComponent>

Test builder of IViewComponentBuilder<TViewComponent> type.

| Improve this Doc View Source

Instance(TViewComponent)

Starts a view component test.

Declaration
public static IViewComponentBuilder<TViewComponent> Instance(TViewComponent viewComponent)
Parameters
Type Name Description
TViewComponent viewComponent

Instance of the ASP.NET Core MVC view component to test.

Returns
Type Description
IViewComponentBuilder<TViewComponent>

Test builder of IViewComponentBuilder<TViewComponent> type.

| Improve this Doc View Source

Instance(Func<TViewComponent>)

Starts a view component test.

Declaration
public static IViewComponentBuilder<TViewComponent> Instance(Func<TViewComponent> construction)
Parameters
Type Name Description
System.Func<TViewComponent> construction

Construction function returning the instantiated view component.

Returns
Type Description
IViewComponentBuilder<TViewComponent>

Test builder of IViewComponentBuilder<TViewComponent> type.

Extension Methods

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