AsyncActionAssertions.ThrowArgumentExceptionAsync Method
Definition
Asserts that the async action throws an ArgumentException with the specified message and parameter name.
public Task<ActionAssertionsChain<ArgumentException>> ThrowArgumentExceptionAsync(string expectedMessage, string expectedParamName);
Parameters
| Name | Type | Description |
|---|---|---|
| expectedMessage | String | The expected exception message. |
| expectedParamName | String | The expected parameter name. |
Returns
Task<ActionAssertionsChain<ArgumentException>>
A Task<TResult> that resolves to an ActionAssertionsChain<TException> containing the thrown exception.