public void CanSpecifyMinAndMaxComparisonResultInAnyOrder() { Matcher matcher = new ComparisonMatcher(10, 0, -1); Assert.IsTrue(matcher.Matches(9), "less"); Assert.IsTrue(matcher.Matches(10), "equal"); Assert.IsFalse(matcher.Matches(11), "greater"); }
public void MatchesAComparisonOfAComparableValue() { Matcher matcher; matcher = new ComparisonMatcher(10, -1, 0); Assert.IsTrue(matcher.Matches(9), "less"); Assert.IsTrue(matcher.Matches(10), "equal"); Assert.IsFalse(matcher.Matches(11), "greater"); matcher = new ComparisonMatcher(10, -1, -1); Assert.IsTrue(matcher.Matches(9), "less"); Assert.IsFalse(matcher.Matches(10), "equal"); Assert.IsFalse(matcher.Matches(11), "greater"); matcher = new ComparisonMatcher(10, 0, 1); Assert.IsFalse(matcher.Matches(9), "less"); Assert.IsTrue(matcher.Matches(10), "equal"); Assert.IsTrue(matcher.Matches(11), "greater"); }