Skip to content

ExceptionExtensions.NotHaveActualValue Method ​

Definition ​

Asserts that the ArgumentOutOfRangeException does not have the specified actual value.

c#
public static AssertionsChain<ExceptionAssertions<TException>, TException> NotHaveActualValue<TException>(this ExceptionAssertions<TException> assertions, object expected)
   where TException : ArgumentOutOfRangeException;

View source

Type Parameters ​

NameDescription
TExceptionThe type of the exception.

Parameters ​

NameTypeDescription
assertionsExceptionAssertions<TException>The assertions object.
expectedObjectThe actual value that is not expected.

Returns ​

AssertionsChain<ExceptionAssertions<TException>, TException>

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