Class ResolvedRouteTestBuilderDataAnnotationsExtensions
Contains ModelStateDictionary extension methods for IResolvedRouteTestBuilder.
Inheritance
System.Object
ResolvedRouteTestBuilderDataAnnotationsExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.DataAnnotations.dll
Syntax
public static class ResolvedRouteTestBuilderDataAnnotationsExtensions
Methods
| Improve this Doc View SourceToInvalidModelState(IResolvedRouteTestBuilder, Nullable<Int32>)
Tests whether the resolved route has invalid ModelStateDictionary.
Declaration
public static IAndResolvedRouteTestBuilder ToInvalidModelState(this IResolvedRouteTestBuilder resolvedRouteTestBuilder, int ? withNumberOfErrors = null)
Parameters
Type | Name | Description |
---|---|---|
IResolvedRouteTestBuilder | resolvedRouteTestBuilder | Instance of IResolvedRouteTestBuilder type. |
System.Nullable<System.Int32> | withNumberOfErrors | Expected number of errors. If default null is provided, the test builder checks only if any errors are found. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Routing.IAndResolvedRouteTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Routing.IAndResolvedRouteTestBuilder. |
ToValidModelState(IResolvedRouteTestBuilder)
Tests whether the resolved route has valid ModelStateDictionary.
Declaration
public static IAndResolvedRouteTestBuilder ToValidModelState(this IResolvedRouteTestBuilder resolvedRouteTestBuilder)
Parameters
Type | Name | Description |
---|---|---|
IResolvedRouteTestBuilder | resolvedRouteTestBuilder | Instance of IResolvedRouteTestBuilder type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Routing.IAndResolvedRouteTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Routing.IAndResolvedRouteTestBuilder. |