ExceptionAssertions<T> Class
Definition
Provides assertions for exception values.
public sealed class ExceptionAssertions<T> : ObjectAssertions<T>
where T : Exception
Type Parameters
| Name | Description |
|---|---|
T |
The type of the exception being asserted on. |
Constructors
| Name | Description |
|---|---|
ExceptionAssertions(T) |
Provides assertions for exception values. |
Methods
| Name | Description |
|---|---|
HaveInnerException<TException>() |
Asserts that the exception has an inner exception of the specified type. |
HaveInnerException<TException>(TException) |
Asserts that the exception has the exact specified inner exception instance. |
HaveMessage(String, StringComparison) |
Asserts that the exception has the specified message. |
HaveMessageStartingWith(String, StringComparison) |
Asserts that the exception message starts with the specified string. |
NotHaveInnerException() |
Asserts that the exception does not have an inner exception. |
NotHaveMessage(String, StringComparison) |
Asserts that the exception does not have the specified message. |
NotHaveMessageStartingWith(String, StringComparison) |
Asserts that the exception message does not start with the specified string. |