Class PredicateConstraint<T>
Predicate constraint wraps a Predicate in a constraint,
returning success if the predicate is true.
Inheritance
PredicateConstraint<T>
Assembly: nunit.framework.dll
Syntax
public class PredicateConstraint<T> : Constraint, IConstraint, IResolveConstraint
Type Parameters
Constructors
View Source
PredicateConstraint(Predicate<T>)
Construct a PredicateConstraint from a predicate
Declaration
public PredicateConstraint(Predicate<T> predicate)
Parameters
Properties
View Source
Description
Gets text describing a constraint
Declaration
public override string Description { get; }
Property Value
Overrides
Methods
View Source
ApplyTo<TActual>(TActual)
Determines whether the predicate succeeds when applied
to the actual value.
Declaration
public override ConstraintResult ApplyTo<TActual>(TActual actual)
Parameters
Type |
Name |
Description |
TActual |
actual |
|
Returns
Type Parameters
Overrides
Implements