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