Interface IBadRequestErrorMessageTestBuilder
Used for testing specific Microsoft.AspNetCore.Mvc.BadRequestObjectResult text error messages.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface IBadRequestErrorMessageTestBuilder : IBaseTestBuilderWithInvokedAction, IBaseTestBuilderWithAction, IBaseTestBuilderWithComponent, IBaseTestBuilder
Methods
| Improve this Doc View SourceBeginningWith(String)
Tests whether particular error message begins with given message.
Declaration
IAndBadRequestTestBuilder BeginningWith(string beginMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | beginMessage | Expected beginning for particular error message. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder | Test builder of type MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder. |
Containing(String)
Tests whether particular error message contains given message.
Declaration
IAndBadRequestTestBuilder Containing(string containsMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | containsMessage | Expected containing string for particular error message. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder | Test builder of type MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder. |
EndingWith(String)
Tests whether particular error message ends with given message.
Declaration
IAndBadRequestTestBuilder EndingWith(string endMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | endMessage | Expected ending for particular error message. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder | Test builder of type MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder. |
ThatEquals(String)
Tests whether particular error message is equal to given message.
Declaration
IAndBadRequestTestBuilder ThatEquals(string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | errorMessage | Expected error message for particular key. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder | Test builder of type MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.BadRequest.IAndBadRequestTestBuilder. |