ReactiveAssert.Throws<TException> Method (Action, String)

Asserts that the given action throws an exception of the type specified in the generic parameter.

Namespace:  Microsoft.Reactive.Testing
Assembly:  Microsoft.Reactive.Testing (in Microsoft.Reactive.Testing.dll)

public static void Throws<TException>(
	Action action,
	string message
)
where TException : Exception

Type Parameters

TException

The type of the exception to check for.

Parameters

action
Type: System.Action
Action to run.
message
Type: System.String
The error message for assert failure.
Show: