ExceptionAssertions<T>.NotHaveMessage Method
Definition
Asserts that the exception does not have the specified message.
c#
public AssertionsChain<ExceptionAssertions<T>, T> NotHaveMessage(string expected, StringComparison comparison = StringComparison.System.StringComparison);Parameters
| Name | Type | Description |
|---|---|---|
expected | String | The message that is not expected. |
comparison | StringComparison | The StringComparison to use. Defaults to InvariantCulture. |
Returns
AssertionsChain<ExceptionAssertions<T>, T>
An AssertionsChain<TAssertions, T> for chaining further assertions.