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