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

EqualConstraint

public class EqualConstraint : Constraint
EqualConstraint 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 EqualConstraint AsCollection { get; }

Flag the constraint to compare arrays as collections and return self.

public EqualConstraint Days { get; }

Causes the tolerance to be interpreted as a TimeSpan in days.

public EqualConstraint Hours { get; }

Causes the tolerance to be interpreted as a TimeSpan in hours.

public EqualConstraint IgnoreCase { get; }

Flag the constraint to ignore case and return self.

public EqualConstraint Milliseconds { get; }

Causes the tolerance to be interpreted as a TimeSpan in milliseconds.

public EqualConstraint Minutes { get; }

Causes the tolerance to be interpreted as a TimeSpan in minutes.

public EqualConstraint NoClip { get; }

Flag the constraint to suppress string clipping and return self.

public EqualConstraint Percent { get; }

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

public EqualConstraint Seconds { get; }

Causes the tolerance to be interpreted as a TimeSpan in seconds.

public EqualConstraint Ticks { get; }

Causes the tolerance to be interpreted as a TimeSpan in clock ticks.

public EqualConstraint Ulps { get; }

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

public EqualConstraint(object expected)

Initializes a new instance of the EqualConstraint class.

Flag the constraint to use the supplied IComparer object.

public EqualConstraint Using(IComparer comparer)

Flag the constraint to use the supplied IComparer object.

public EqualConstraint Using<T>(IComparer<T> comparer)

Flag the constraint to use the supplied IComparer object.

public EqualConstraint Using<T>(Comparison<T> comparer)

Flag the constraint to use the supplied Comparison object.

Flag the constraint to use the supplied IEqualityComparer object.

public EqualConstraint Using<T>(IEqualityComparer<T> comparer)

Flag the constraint to use the supplied IEqualityComparer object.

public EqualConstraint Within(object amount)

Flag the constraint to use a tolerance when determining equality.