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

Class ViewComponentShouldReturnTestBuilderExtensions

Contains extension methods for IViewComponentShouldReturnTestBuilder<TInvocationResult>.

Inheritance
System.Object
ViewComponentShouldReturnTestBuilderExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Helpers.dll
Syntax
public static class ViewComponentShouldReturnTestBuilderExtensions

Methods

| Improve this Doc View Source

View<TInvocationResult, TModel>(IViewComponentShouldReturnTestBuilder<TInvocationResult>, TModel)

Tests whether the view component result is Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult with the provided deeply equal model object.

Declaration
public static IAndViewTestBuilder View<TInvocationResult, TModel>(this IViewComponentShouldReturnTestBuilder<TInvocationResult> builder, TModel model)
Parameters
Type Name Description
IViewComponentShouldReturnTestBuilder<TInvocationResult> builder

Instance of IViewComponentShouldReturnTestBuilder<TInvocationResult> type.

TModel model

Expected model object.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder type.

Type Parameters
Name Description
TInvocationResult Type of invocation result.
TModel Expected model type.
| Improve this Doc View Source

View<TInvocationResult, TModel>(IViewComponentShouldReturnTestBuilder<TInvocationResult>, String, TModel)

Tests whether the view component result is Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult with the provided view name and deeply equal model object.

Declaration
public static IAndViewTestBuilder View<TInvocationResult, TModel>(this IViewComponentShouldReturnTestBuilder<TInvocationResult> builder, string viewName, TModel model)
Parameters
Type Name Description
IViewComponentShouldReturnTestBuilder<TInvocationResult> builder

Instance of IViewComponentShouldReturnTestBuilder<TInvocationResult> type.

System.String viewName

Expected view name.

TModel model

Expected model object.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder type.

Type Parameters
Name Description
TInvocationResult Type of invocation result.
TModel Expected model type.
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX