Class ModelErrorTestBuilderViewFeaturesExtensions
Contains view features extension methods for IModelErrorTestBuilder<TModel>.
Inheritance
System.Object
ModelErrorTestBuilderViewFeaturesExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.ViewFeatures.dll
Syntax
public static class ModelErrorTestBuilderViewFeaturesExtensions
Methods
| Improve this Doc View SourceContainingErrorFor<TModel, TMember>(IModelErrorTestBuilder<TModel>, Expression<Func<TModel, TMember>>)
Tests whether the tested ModelStateDictionary contains error by member expression.
Declaration
public static IModelErrorDetailsTestBuilder<TModel> ContainingErrorFor<TModel, TMember>(this IModelErrorTestBuilder<TModel> modelErrorTestBuilder, Expression<Func<TModel, TMember>> memberWithError)
Parameters
Type | Name | Description |
---|---|---|
IModelErrorTestBuilder<TModel> | modelErrorTestBuilder | Instance of IModelErrorTestBuilder<TModel> type. |
System.Linq.Expressions.Expression<System.Func<TModel, TMember>> | memberWithError | Member expression for the tested member. |
Returns
Type | Description |
---|---|
IModelErrorDetailsTestBuilder<TModel> | Test builder of IModelErrorDetailsTestBuilder<TModel> type. |
Type Parameters
Name | Description |
---|---|
TModel | Type of model which will be tested for no errors. |
TMember | Type of the member which will be tested for errors. |
ContainingNoErrorFor<TModel, TMember>(IModelErrorTestBuilder<TModel>, Expression<Func<TModel, TMember>>)
Tests whether the tested ModelStateDictionary contains no error by member expression.
Declaration
public static IAndModelErrorTestBuilder<TModel> ContainingNoErrorFor<TModel, TMember>(this IModelErrorTestBuilder<TModel> modelErrorTestBuilder, Expression<Func<TModel, TMember>> memberWithNoError)
Parameters
Type | Name | Description |
---|---|---|
IModelErrorTestBuilder<TModel> | modelErrorTestBuilder | Instance of IModelErrorTestBuilder<TModel> type. |
System.Linq.Expressions.Expression<System.Func<TModel, TMember>> | memberWithNoError | Member expression for the tested member. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Models.IAndModelErrorTestBuilder<TModel> | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Models.IAndModelErrorTestBuilder`1. |
Type Parameters
Name | Description |
---|---|
TModel | Type of model which will be tested for no errors. |
TMember | Type of the member which will be tested for no errors. |