GreaterThanConstraint
Tests whether a value is greater than the value supplied to its constructor
using System.Runtime.CompilerServices;
namespace NUnit.Framework.Constraints
{
[NullableContext(1)]
[Nullable(0)]
public class GreaterThanConstraint : ComparisonConstraint
{
public GreaterThanConstraint(object expected)
: base(expected, "greater than ")
{
}
protected override bool PerformComparison(ComparisonAdapter comparer, object actual, object expected, Tolerance tolerance)
{
return comparer.Compare(actual, tolerance.ApplyToValue(expected).LowerBound) > 0;
}
}
}