Class BadRequestTestBuilderExtensions
Contains extension methods for IBadRequestTestBuilder.
Inheritance
System.Object
BadRequestTestBuilderExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Helpers.dll
Syntax
public static class BadRequestTestBuilderExtensions
Methods
| Improve this Doc View SourceWithError<TError>(IBadRequestTestBuilder, TError)
Tests whether Microsoft.AspNetCore.Mvc.BadRequestObjectResult contains deeply equal error value as the provided error object.
Declaration
public static IAndModelDetailsTestBuilder<TError> WithError<TError>(this IBadRequestTestBuilder builder, TError error)
Parameters
Type | Name | Description |
---|---|---|
IBadRequestTestBuilder | builder | Instance of IBadRequestTestBuilder type. |
TError | error | Error object. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Models.IAndModelDetailsTestBuilder<TError> | Test builder of type IModelDetailsTestBuilder<TModel>. |
Type Parameters
Name | Description |
---|---|
TError | Type of error object. |
WithErrorOfType<TError>(IBadRequestTestBuilder)
Tests whether Microsoft.AspNetCore.Mvc.BadRequestObjectResult contains error object of the provided type.
Declaration
public static IAndModelDetailsTestBuilder<TError> WithErrorOfType<TError>(this IBadRequestTestBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IBadRequestTestBuilder | builder | Instance of IBadRequestTestBuilder type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Models.IAndModelDetailsTestBuilder<TError> | Test builder of type IModelDetailsTestBuilder<TModel>. |
Type Parameters
Name | Description |
---|---|
TError | Type of error object. |