ExceptionAssertions<T>.HaveMessageStartingWith Method
Definition
Asserts that the exception message starts with the specified string.
public ExceptionAssertionsChain<T> HaveMessageStartingWith(string expected, StringComparison comparison = StringComparison.System.StringComparison);
Parameters
| Name | Type | Description |
|---|---|---|
expected |
String |
The expected message prefix. |
comparison |
StringComparison |
The StringComparison to use. Defaults to InvariantCulture. |
Returns
An ExceptionAssertionsChain<T> for chaining further assertions.