MY TESTED ASP.NET CORE MVC DOCS
Show / Hide Table of Contents

Interface IModelErrorTestBuilder<TModel>

Used for testing ModelStateDictionary errors.

Inherited Members
IBaseTestBuilderWithModelError.ContainingNoErrors()
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 Source

ContainingError(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.

| Improve this Doc View Source

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.

Extension Methods

ModelErrorTestBuilderViewFeaturesExtensions.ContainingErrorFor<TModel, TMember>(Expression<Func<TModel, TMember>>)
ModelErrorTestBuilderViewFeaturesExtensions.ContainingNoErrorFor<TModel, TMember>(Expression<Func<TModel, TMember>>)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX