Warn.

If<TActual>(ActualValueDelegate<TActual>, IResolveConstraint, Func<string>) Method

Summary

Apply a constraint to an actual value, succeeding if the constraint fails and issuing a warning on failure.
Namespace
TCLite
Containing Type
Warn

Syntax

public static void If<TActual>(ActualValueDelegate<TActual> del, IResolveConstraint expr, Func<string> getExceptionMessage)

Type Parameters

Name Description
TActual The Type being compared.

Parameters

Name Type Description
del ActualValueDelegate<TActual> An ActualValueDelegate returning the value to be tested
expr IResolveConstraint A Constraint expression to be applied
getExceptionMessage Func<string> A function to build the message included with the Exception

Return Value

Type Description
void