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

Interface IViewComponentShouldHaveTestBuilder<TInvocationResult>

Used for testing the view component's additional data - attributes, HTTP response, view bag and more.

Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations
Assembly:MyTested.AspNetCore.Mvc.ViewComponents.dll
Syntax
public interface IViewComponentShouldHaveTestBuilder<TInvocationResult> : IBaseTestBuilderWithComponentShouldHaveTestBuilder<IAndViewComponentResultTestBuilder<TInvocationResult>>, IBaseTestBuilder
Type Parameters
Name Description
TInvocationResult Result from invoked view component in ASP.NET Core MVC.

Methods

| Improve this Doc View Source

Attributes(Action<IViewComponentAttributesTestBuilder>)

Tests whether the view component has specific attributes.

Declaration
IAndViewComponentResultTestBuilder<TInvocationResult> Attributes(Action<IViewComponentAttributesTestBuilder> attributesTestBuilder)
Parameters
Type Name Description
System.Action<IViewComponentAttributesTestBuilder> attributesTestBuilder

Builder for testing specific attributes on the view component.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations.IAndViewComponentResultTestBuilder<TInvocationResult>

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations.IAndViewComponentResultTestBuilder`1 type.

| Improve this Doc View Source

Attributes(Nullable<Int32>)

Tests whether the view component has at least 1 attribute of any type.

Declaration
IAndViewComponentResultTestBuilder<TInvocationResult> Attributes(int ? withTotalNumberOf = null)
Parameters
Type Name Description
System.Nullable<System.Int32> withTotalNumberOf

Optional parameter specifying the exact total number of attributes on the tested view component.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations.IAndViewComponentResultTestBuilder<TInvocationResult>

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations.IAndViewComponentResultTestBuilder`1 type.

| Improve this Doc View Source

NoAttributes()

Tests whether the view component has no attributes of any type.

Declaration
IAndViewComponentResultTestBuilder<TInvocationResult> NoAttributes()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations.IAndViewComponentResultTestBuilder<TInvocationResult>

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations.IAndViewComponentResultTestBuilder`1 type.

Extension Methods

ComponentShouldHaveTestBuilderSessionExtensions.NoSession<IAndViewComponentResultTestBuilder<TInvocationResult>>()
ComponentShouldHaveTestBuilderSessionExtensions.Session<IAndViewComponentResultTestBuilder<TInvocationResult>>(Nullable<Int32>)
ComponentShouldHaveTestBuilderSessionExtensions.Session<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<ISessionTestBuilder>)
ComponentShouldHaveTestBuilderModelStateExtensions.ModelState<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<IModelStateTestBuilder>)
ComponentShouldHaveTestBuilderModelStateExtensions.ValidModelState<IAndViewComponentResultTestBuilder<TInvocationResult>>()
ComponentShouldHaveTestBuilderModelStateExtensions.InvalidModelState<IAndViewComponentResultTestBuilder<TInvocationResult>>(Nullable<Int32>)
ComponentShouldHaveTestBuilderHttpExtensions.HttpResponse<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<IHttpResponseTestBuilder>)
ComponentShouldHaveTestBuilderCachingExtensions.NoMemoryCache<IAndViewComponentResultTestBuilder<TInvocationResult>>()
ComponentShouldHaveTestBuilderCachingExtensions.MemoryCache<IAndViewComponentResultTestBuilder<TInvocationResult>>(Nullable<Int32>)
ComponentShouldHaveTestBuilderCachingExtensions.MemoryCache<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<IMemoryCacheTestBuilder>)
ComponentShouldHaveTestBuilderViewBagExtensions.NoViewBag<IAndViewComponentResultTestBuilder<TInvocationResult>>()
ComponentShouldHaveTestBuilderViewBagExtensions.ViewBag<IAndViewComponentResultTestBuilder<TInvocationResult>>(Nullable<Int32>)
ComponentShouldHaveTestBuilderViewBagExtensions.ViewBag<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<IViewBagTestBuilder>)
ComponentShouldHaveTestBuilderViewDataExtensions.NoViewData<IAndViewComponentResultTestBuilder<TInvocationResult>>()
ComponentShouldHaveTestBuilderViewDataExtensions.ViewData<IAndViewComponentResultTestBuilder<TInvocationResult>>(Nullable<Int32>)
ComponentShouldHaveTestBuilderViewDataExtensions.ViewData<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<IViewDataTestBuilder>)
ComponentShouldHaveTestBuilderEntityFrameworkCoreExtensions.DbContext<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<IDbContextTestBuilder>)
ComponentShouldHaveTestBuilderTempDataExtensions.NoTempData<IAndViewComponentResultTestBuilder<TInvocationResult>>()
ComponentShouldHaveTestBuilderTempDataExtensions.TempData<IAndViewComponentResultTestBuilder<TInvocationResult>>(Nullable<Int32>)
ComponentShouldHaveTestBuilderTempDataExtensions.TempData<IAndViewComponentResultTestBuilder<TInvocationResult>>(Action<ITempDataTestBuilder>)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX