GreaterThanConstraint
Tests whether a value is greater than the value supplied to its constructor
namespace NUnit.Framework.Constraints
{
public class GreaterThanConstraint : ComparisonConstraint
{
public GreaterThanConstraint(object expected)
: base(expected)
{
Description = "greater than " + MsgUtils.FormatValue(expected);
}
protected override bool PerformComparison(ComparisonAdapter comparer, object actual, object expected, Tolerance tolerance)
{
return comparer.Compare(actual, tolerance.ApplyToValue(expected).LowerBound) > 0;
}
}
}