Exemplo n.º 1
0
        public void TestGetHints()
        {
            WordsHintBuilder.Words.Add("Abcd");
            WordsHintBuilder.BuildIndexByBatch(Config, true, true, true, null, true, 1000);

            CollectionAssert.AreEquivalent(new[] { "Abcd" }, CodeIndexSearcher.GetHints(Config.LuceneIndexForHint, "abc", 20, false));
            CollectionAssert.IsEmpty(CodeIndexSearcher.GetHints(Config.LuceneIndexForHint, "abc", 20, true));
            CollectionAssert.AreEquivalent(new[] { "Abcd" }, CodeIndexSearcher.GetHints(Config.LuceneIndexForHint, "Abc", 20, true));
        }