Interface IModelErrorTestBuilder<TModel>
Used for testing ModelStateDictionary errors.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Models
Assembly:MyTested.AspNetCore.Mvc.ModelState.dll
Syntax
public interface IModelErrorTestBuilder<TModel> : IBaseTestBuilderWithModelError
Type Parameters
| Name | Description |
|---|---|
| TModel | Model from invoked method in ASP.NET Core MVC. |
Methods
| Improve this Doc View SourceContainingError(String)
Tests whether the tested ModelStateDictionary contains error by key.
Declaration
IModelErrorDetailsTestBuilder<TModel> ContainingError(string errorKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | errorKey | Error key to search for. |
Returns
| Type | Description |
|---|---|
| IModelErrorDetailsTestBuilder<TModel> | Test builder of IModelErrorDetailsTestBuilder<TModel> type. |
ContainingNoError(String)
Tests whether the tested ModelStateDictionary does not contain error by key.
Declaration
IAndModelErrorTestBuilder<TModel> ContainingNoError(string errorKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | errorKey | Error key to search for. |
Returns
| Type | Description |
|---|---|
| MyTested.AspNetCore.Mvc.Builders.Contracts.Models.IAndModelErrorTestBuilder<TModel> | Test builder of IModelErrorDetailsTestBuilder<TModel> type. |