public void AnyLengthIsTrueForAnyLength()
        {
            ExpressionMatchProvider<char> provider = new ExpressionMatchProvider<char> (m_anyLength);

             int max = 100;
             var lengths = provider.GetPossibleMatchLengths (max);

             Assert.IsTrue (provider.AnyLength, "AnyLength");
             Assert.IsTrue (lengths is AnyLengthMatchProvider.AnyLengthEnumerable, "AnyLengthEnumerable");
             Assert.AreEqual(((AnyLengthMatchProvider.AnyLengthEnumerable) lengths).Maximum, max, "AnyLengthEnumerable.Maximum");
        }
        public void SupportsLookBackIsFalseForNoLookBack()
        {
            ExpressionMatchProvider<char> provider = new ExpressionMatchProvider<char> (m_noLookBack);

             Assert.IsFalse (provider.SupportsLookBack);
             Assert.AreEqual(AnyLengthMatchProvider.NoMatches, provider.GetPossibleMatchLengths (100), "GetPossibleMatchLengths should be empty");
        }
        public void SupportsLookBackIsTrueForLookBack()
        {
            ExpressionMatchProvider<char> provider = new ExpressionMatchProvider<char> (m_lookBack);

             int max = 100;
             var lengths = provider.GetPossibleMatchLengths (max);
             Assert.IsTrue (provider.SupportsLookBack);
             Assert.AreEqual(((AnyLengthMatchProvider.AnyLengthEnumerable) lengths).Maximum, max, "AnyLengthEnumerable.Maximum");
        }
        public void GetPossibleMatchLengthsReturns1ForClass()
        {
            ExpressionMatchProvider<char> provider = new ExpressionMatchProvider<char> (m_five);

             var matchLengths = provider.GetPossibleMatchLengths (100).ToList ();

             Assert.AreEqual (1, matchLengths.Count, "Count");
             Assert.AreEqual (1, matchLengths[0], "list[0]");
        }