ThrowsConstraint.

ApplyConstraint<T>(T) Method

Summary

Executes the code of the delegate and captures any exception. If a non-null base constraint was provided, it applies that constraint to the exception.
Namespace
TCLite.Constraints
Containing Type
ThrowsConstraint

Syntax

protected override ConstraintResult ApplyConstraint<T>(T actual)

Type Parameters

Name Description
T

Parameters

Name Type Description
actual T A delegate representing the code to be tested

Return Value

Type Description
ConstraintResult True if an exception is thrown and the constraint succeeds, otherwise false