public void ShouldCalculateEffectivenessWithNoInvertedIndex() { IDictionary indexes = new HashDictionary(); BetweenFilter filter = new BetweenFilter(m_extractor, 10, 20); var effectiveness = filter.CalculateEffectiveness(indexes, s_setKeys); Assert.AreEqual(ExtractorFilter.EVAL_COST * s_setKeys.Count, effectiveness); }
public void ShouldCalculateEffectivenessWhenInvertedIndexIsPlainSet() { IDictionary indexes = new HashDictionary(); indexes[m_extractor] = s_sortedIndex; BetweenFilter filter = new BetweenFilter(m_extractor, 10, 20); var effectiveness = filter.CalculateEffectiveness(indexes, s_setKeys); Assert.AreEqual(s_sortedIndex.IndexContents.Count, effectiveness); }