ExceptionExtensions.HaveParamName Method
Definition
Asserts that the ArgumentException has the specified parameter name.
c#
public static AssertionsChain<ExceptionAssertions<TException>, TException> HaveParamName<TException>(this ExceptionAssertions<TException> assertions, string expected)
where TException : ArgumentException;Type Parameters
| Name | Description |
|---|---|
TException | The type of the exception. |
Parameters
| Name | Type | Description |
|---|---|---|
assertions | ExceptionAssertions<TException> | The assertions object. |
expected | String | The expected parameter name. |
Returns
AssertionsChain<ExceptionAssertions<TException>, TException>
An AssertionsChain<TAssertions, T> for chaining further assertions.