Skip to content

ExceptionExtensions.NotHaveParamName Method ​

Definition ​

Asserts that the ArgumentException does not have the specified parameter name.

c#
public static AssertionsChain<ExceptionAssertions<TException>, TException> NotHaveParamName<TException>(this ExceptionAssertions<TException> assertions, string expected)
   where TException : ArgumentException;

View source

Type Parameters ​

NameDescription
TExceptionThe type of the exception.

Parameters ​

NameTypeDescription
assertionsExceptionAssertions<TException>The assertions object.
expectedStringThe parameter name that is not expected.

Returns ​

AssertionsChain<ExceptionAssertions<TException>, TException>

An AssertionsChain<TAssertions, T> for chaining further assertions.