ActionAssertions.ThrowArgumentException Method
Definition
Asserts that the action throws an ArgumentException with the specified message and parameter name.
c#
public ActionAssertionsChain<ArgumentException> ThrowArgumentException(string expectedMessage, string expectedParamName);Parameters
| Name | Type | Description |
|---|---|---|
expectedMessage | String | The expected exception message. |
expectedParamName | String | The expected parameter name. |
Returns
ActionAssertionsChain<ArgumentException>
An ActionAssertionsChain<TException> containing the thrown exception.