Skip to content

ExceptionAssertions<T>.NotHaveMessage Method

Definition

Asserts that the exception does not have the specified message.

public ExceptionAssertionsChain<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

ExceptionAssertionsChain<T>

An ExceptionAssertionsChain<T> for chaining further assertions.