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

LessThanOrEqualConstraint

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