public void GetPossibleMatchLengthsReturnsNoneForNone() { var expression = new LookAheadExpression<char> ( new MockExpression<char> {AnyLength = false, PossibleMatchLengths = new int[0], SupportsLookBack = true}); var actual = expression.GetPossibleMatchLengths (100).ToList (); Assert.AreEqual (0, actual.Count, "Count"); }
public void GetPossibleMatchLengthsReturns0ForTwoThreeFive() { var expression = new LookAheadExpression<char> ( new MockExpression<char> {AnyLength = false, PossibleMatchLengths = new []{2,3,5}, SupportsLookBack = true}); var actual = expression.GetPossibleMatchLengths (100).ToList (); Assert.AreEqual (1, actual.Count, "Count"); Assert.AreEqual (0, actual[0], "value at [0]"); }