Skip to content

AsyncActionAssertions.ThrowArgumentOutOfRangeExceptionAsync Method ​

Definition ​

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

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

Parameters ​

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

Returns ​

Task<ActionAssertionsChain<ArgumentOutOfRangeException>>

A Task<TResult> that resolves to an ActionAssertionsChain<TException> containing the thrown exception.