public void ShouldApplyIndexWhenUpperBoundIsNull()
        {
            IDictionary   indexes = new HashDictionary();
            ICollection   keys    = new HashSet(s_setKeys);
            BetweenFilter filter  = new BetweenFilter(m_extractor, 10, null);
            var           result  = filter.ApplyIndex(indexes, keys);

            Assert.IsNull(result);
            Assert.AreEqual(keys.Count, 0);
        }
        public void ShouldApplyIndexWhenNoMatchingIndexPresent()
        {
            IDictionary   indexes = new HashDictionary();
            ICollection   keys    = new HashSet(s_setKeys);
            BetweenFilter filter  = new BetweenFilter(m_extractor, 10, 20);
            var           result  = filter.ApplyIndex(indexes, keys);

            Assert.AreSame(filter, result);
            Assert.AreEqual(s_setKeys, keys);
        }
        public void ShouldApplyIndexWhenUnsortedIndexPresent()
        {
            IDictionary   indexes = new HashDictionary();
            ICollection   keys    = new HashSet(s_setKeys);
            BetweenFilter filter  = new BetweenFilter(m_extractor, 10, 20);

            indexes[m_extractor] = s_unsortedIndex;

            var result = filter.ApplyIndex(indexes, keys);

            Assert.IsNull(result);
            Assert.IsTrue(s_setKeysTenToTwenty.Equals(keys));
        }