Esempio n. 1
0
        public void AnItemCanBeAddedToTheIndex()
        {
            Assert.AreEqual(2000, indexer.Count());

            indexer.Add(tdg.ANewUser());

            Assert.AreEqual(2001, indexer.Count());
        }
Esempio n. 2
0
        public void AnItemCanBeAddedToTheIndex()
        {
            TestDataGenerator tdg       = new TestDataGenerator();
            Directory         directory = new RAMDirectory();
            Analyzer          analyzer  = new StandardAnalyzer(Lucene.Net.Util.LuceneVersion.LUCENE_48);

            _indexer = new LuceneIndexer(directory, analyzer);
            _indexer.CreateIndex(tdg.AllData);
            Assert.Equal(2000, _indexer.Count());

            _indexer.Add(tdg.ANewUser());

            Assert.Equal(2001, _indexer.Count());
            directory.ClearLock("write.lock");
        }