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

EqualNumericWithoutUsingConstraint<T>

public class EqualNumericWithoutUsingConstraint<T> : Constraint where T : struct
EqualNumericConstraint is able to compare an actual value with the expected value provided in its constructor. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types.
public T Expected { get; }

The expected value.

Switches the .Within() modifier to interpret its tolerance as a percentage that the actual values is allowed to deviate from the expected value.

public Tolerance Tolerance { get; }

Gets the tolerance for this comparison.

Switches the .Within() modifier to interpret its tolerance as a distance in representable values (see remarks).

Initializes a new instance of the EqualConstraint class.

public ConstraintResult ApplyTo(T actual)

Test whether the constraint is satisfied by a given value

Flag the constraint to use a tolerance when determining equality.