Class ShouldReturnTestBuilderViewComponentResultExtensions
Contains Microsoft.AspNetCore.Mvc.ViewComponentResult extension methods for IShouldReturnTestBuilder<TActionResult>.
Inheritance
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.ViewActionResults.dll
Syntax
public static class ShouldReturnTestBuilderViewComponentResultExtensions
Methods
| Improve this Doc View SourceViewComponent<TActionResult>(IShouldReturnTestBuilder<TActionResult>)
Tests whether the action result is Microsoft.AspNetCore.Mvc.ViewComponentResult.
Declaration
public static IAndViewComponentTestBuilder ViewComponent<TActionResult>(this IShouldReturnTestBuilder<TActionResult> builder)
Parameters
Type | Name | Description |
---|---|---|
IShouldReturnTestBuilder<TActionResult> | builder | Instance of IShouldReturnTestBuilder<TActionResult> type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder type. |
Type Parameters
Name | Description |
---|---|
TActionResult | Type of action result type. |
ViewComponent<TActionResult>(IShouldReturnTestBuilder<TActionResult>, String)
Tests whether the action result is Microsoft.AspNetCore.Mvc.ViewComponentResult with the provided view component name.
Declaration
public static IAndViewComponentTestBuilder ViewComponent<TActionResult>(this IShouldReturnTestBuilder<TActionResult> builder, string viewComponentName)
Parameters
Type | Name | Description |
---|---|---|
IShouldReturnTestBuilder<TActionResult> | builder | Instance of IShouldReturnTestBuilder<TActionResult> type. |
System.String | viewComponentName | Expected view component name. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder type. |
Type Parameters
Name | Description |
---|---|
TActionResult | Type of action result type. |
ViewComponent<TActionResult>(IShouldReturnTestBuilder<TActionResult>, Type)
Tests whether the action result is Microsoft.AspNetCore.Mvc.ViewComponentResult with the provided view component type.
Declaration
public static IAndViewComponentTestBuilder ViewComponent<TActionResult>(this IShouldReturnTestBuilder<TActionResult> builder, Type viewComponentType)
Parameters
Type | Name | Description |
---|---|---|
IShouldReturnTestBuilder<TActionResult> | builder | Instance of IShouldReturnTestBuilder<TActionResult> type. |
System.Type | viewComponentType | Expected view component type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder type. |
Type Parameters
Name | Description |
---|---|
TActionResult | Type of action result type. |