Class BaseTestBuilderWithResponseModelExtensions
Contains model extension methods for IBaseTestBuilderWithResponseModel.
Inheritance
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Models.dll
Syntax
public static class BaseTestBuilderWithResponseModelExtensions
Methods
| Improve this Doc View SourceWithModel<TModel>(IBaseTestBuilderWithResponseModel, TModel)
Tests whether a deeply equal object to the provided one is returned from the invoked method.
Declaration
public static IAndModelDetailsTestBuilder<TModel> WithModel<TModel>(this IBaseTestBuilderWithResponseModel builder, TModel expectedModel)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseTestBuilderWithResponseModel | builder | Instance of IBaseTestBuilderWithResponseModel type. |
| TModel | expectedModel | Expected model to be returned. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Models.IAndModelDetailsTestBuilder<TModel> | Test builder of IModelDetailsTestBuilder<TModel>. |
Type Parameters
| Name | Description |
|---|---|
| TModel | Type of the model. |
WithModelOfType(IBaseTestBuilderWithResponseModel, Type)
Tests whether model of the given type is returned from the invoked method.
Declaration
public static IAndTestBuilder WithModelOfType(this IBaseTestBuilderWithResponseModel builder, Type modelType)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseTestBuilderWithResponseModel | builder | Instance of IBaseTestBuilderWithResponseModel type. |
| System.Type | modelType | Expected model type. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type. |
WithModelOfType<TModel>(IBaseTestBuilderWithResponseModel)
Tests whether model of the given type is returned from the invoked method.
Declaration
public static IAndModelDetailsTestBuilder<TModel> WithModelOfType<TModel>(this IBaseTestBuilderWithResponseModel builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseTestBuilderWithResponseModel | builder | Instance of IBaseTestBuilderWithResponseModel type. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Models.IAndModelDetailsTestBuilder<TModel> | Test builder of IModelDetailsTestBuilder<TModel>. |
Type Parameters
| Name | Description |
|---|---|
| TModel | Type of the model. |
WithNoModel(IBaseTestBuilderWithResponseModel)
Tests whether no model is returned from the invoked action.
Declaration
public static IAndTestBuilder WithNoModel(this IBaseTestBuilderWithResponseModel builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseTestBuilderWithResponseModel | builder | Instance of IBaseTestBuilderWithResponseModel type. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type. |