<PackageReference Include="NUnit" Version="3.7.0" />

IConstraint

public interface IConstraint : IResolveConstraint
Interface for all constraints
object[] Arguments { get; }

Arguments provided to this Constraint, for use in formatting the description.

ConstraintBuilder Builder { get; set; }

The ConstraintBuilder holding this constraint

string Description { get; }

The Description of what this constraint tests, for use in messages and in the ConstraintResult.

string DisplayName { get; }

The display name of this Constraint for use by ToString().

ConstraintResult ApplyTo<TActual>(TActual actual)

Applies the constraint to an actual value, returning a ConstraintResult.

Applies the constraint to an ActualValueDelegate that returns the value to be tested. The default implementation simply evaluates the delegate but derived classes may override it to provide for delayed processing.

ConstraintResult ApplyTo<TActual>(ref TActual actual)

Test whether the constraint is satisfied by a given reference. The default implementation simply dereferences the value but derived classes may override it to provide for delayed processing.