public void AnItemCanBeAddedToTheIndex() { Assert.AreEqual(2000, indexer.Count()); indexer.Add(tdg.ANewUser()); Assert.AreEqual(2001, indexer.Count()); }
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"); }