Skip to content

ActionAssertions.ThrowArgumentOutOfRangeException Method ​

Definition ​

Asserts that the action throws an ArgumentOutOfRangeException with the specified message, parameter name and actual value.

c#
public ActionAssertionsChain<ArgumentOutOfRangeException> ThrowArgumentOutOfRangeException(string expectedMessage, string expectedParamName, object expectedActualValue);

View source

Parameters ​

NameTypeDescription
expectedMessageStringThe expected exception message.
expectedParamNameStringThe expected parameter name.
expectedActualValueObjectThe expected actual value.

Returns ​

ActionAssertionsChain<ArgumentOutOfRangeException>

An ActionAssertionsChain<TException> containing the thrown exception.