Interface IExceptionMessageTestBuilder
Used for testing specific System.Exception messages.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions
Assembly:MyTested.AspNetCore.Mvc.Abstractions.dll
Syntax
public interface IExceptionMessageTestBuilder : IBaseTestBuilderWithComponent, IBaseTestBuilder
Methods
| Improve this Doc View SourceBeginningWith(String)
Tests whether the System.Exception.Message begins with given message.
Declaration
IAndExceptionTestBuilder BeginningWith(string beginMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | beginMessage | Expected beginning for the System.Exception.Message. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder type. |
Containing(String)
Tests whether the System.Exception.Message contains given message.
Declaration
IAndExceptionTestBuilder Containing(string containsMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | containsMessage | Expected containing string for the System.Exception.Message. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder type. |
EndingWith(String)
Tests whether the System.Exception.Message ends with given message.
Declaration
IAndExceptionTestBuilder EndingWith(string endMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | endMessage | Expected ending for the System.Exception.Message. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder type. |
ThatEquals(String)
Tests whether the System.Exception.Message is equal to given message.
Declaration
IAndExceptionTestBuilder ThatEquals(string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | errorMessage | Expected error message for the System.Exception. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder | Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.CaughtExceptions.IAndExceptionTestBuilder type. |