NUnit.Framework.Constraints.Tolerance
The Tolerance class generalizes the notion of a tolerance
within which an equality test succeeds. Normally, it is
used with numeric types, but it can be used with any
type that supports taking a difference between two
objects and comparing that difference to a value.
namespace NUnit.Framework.Constraints
{
public sealed class Tolerance
{
public readonly struct Range
{
public readonly object LowerBound;
public readonly object UpperBound;
public Range(object lowerBound, object upperBound);
}
public static readonly Tolerance Default;
public static readonly Tolerance Exact;
public Tolerance Percent { get; }
public Tolerance Ulps { get; }
public Tolerance Days { get; }
public Tolerance Hours { get; }
public Tolerance Minutes { get; }
public Tolerance Seconds { get; }
public Tolerance Milliseconds { get; }
public Tolerance Ticks { get; }
public ToleranceMode Mode { get; }
public object Amount { get; }
public bool IsUnsetOrDefault { get; }
public bool HasVariance { get; }
public Tolerance(object amount);
public Range ApplyToValue(object value);
}
}