Class ShouldReturnTestBuilderExtensions
Contains extension methods for IShouldReturnTestBuilder<TActionResult>.
Inheritance
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Helpers.dll
Syntax
public static class ShouldReturnTestBuilderExtensions
Methods
| Improve this Doc View SourcePartialView<TActionResult, TModel>(IShouldReturnTestBuilder<TActionResult>, TModel)
Tests whether the action result is Microsoft.AspNetCore.Mvc.PartialViewResult with the provided deeply equal model object.
Declaration
public static IAndViewTestBuilder PartialView<TActionResult, TModel>(this IShouldReturnTestBuilder<TActionResult> builder, TModel model)
Parameters
Type | Name | Description |
---|---|---|
IShouldReturnTestBuilder<TActionResult> | builder | Instance of IShouldReturnTestBuilder<TActionResult> type. |
TModel | model | Expected model object. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder type. |
Type Parameters
Name | Description |
---|---|
TActionResult | Type of action result. |
TModel | Expected model type. |
PartialView<TActionResult, TModel>(IShouldReturnTestBuilder<TActionResult>, String, TModel)
Tests whether the action result is Microsoft.AspNetCore.Mvc.PartialViewResult with the provided partial view name and deeply equal model object.
Declaration
public static IAndViewTestBuilder PartialView<TActionResult, TModel>(this IShouldReturnTestBuilder<TActionResult> builder, string viewName, TModel model)
Parameters
Type | Name | Description |
---|---|---|
IShouldReturnTestBuilder<TActionResult> | builder | Instance of IShouldReturnTestBuilder<TActionResult> type. |
System.String | viewName | Expected partial view name. |
TModel | model | Expected model object. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder type. |
Type Parameters
Name | Description |
---|---|
TActionResult | Type of action result. |
TModel | Expected model type. |
View<TActionResult, TModel>(IShouldReturnTestBuilder<TActionResult>, TModel)
Tests whether the action result is Microsoft.AspNetCore.Mvc.ViewResult with the provided deeply equal model object.
Declaration
public static IAndViewTestBuilder View<TActionResult, TModel>(this IShouldReturnTestBuilder<TActionResult> builder, TModel model)
Parameters
Type | Name | Description |
---|---|---|
IShouldReturnTestBuilder<TActionResult> | builder | Instance of IShouldReturnTestBuilder<TActionResult> type. |
TModel | model | Expected model object. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder type. |
Type Parameters
Name | Description |
---|---|
TActionResult | Type of action result. |
TModel | Expected model type. |
View<TActionResult, TModel>(IShouldReturnTestBuilder<TActionResult>, String, TModel)
Tests whether the action result is Microsoft.AspNetCore.Mvc.ViewResult with the provided view name and deeply equal model object.
Declaration
public static IAndViewTestBuilder View<TActionResult, TModel>(this IShouldReturnTestBuilder<TActionResult> builder, string viewName, TModel model)
Parameters
Type | Name | Description |
---|---|---|
IShouldReturnTestBuilder<TActionResult> | builder | Instance of IShouldReturnTestBuilder<TActionResult> type. |
System.String | viewName | Expected view name. |
TModel | model | Expected model object. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewTestBuilder type. |
Type Parameters
Name | Description |
---|---|
TActionResult | Type of action result. |
TModel | Expected model type. |