<PackageReference Include="NUnit" Version="5.0.0-beta.1" />

NUnit.Framework.Constraints.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.

ConstraintResult ApplyTo<TActual>(Func<TActual> code)

Applies the constraint to a func 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.