use of org.neo4j.kernel.api.impl.schema.writer.LuceneIndexWriter in project neo4j by neo4j.
the class UniqueDatabaseIndexPopulatingUpdaterTest method additionsDeliveredToIndexWriter.
@Test
public void additionsDeliveredToIndexWriter() throws Exception {
LuceneIndexWriter writer = mock(LuceneIndexWriter.class);
UniqueLuceneIndexPopulatingUpdater updater = newUpdater(writer);
updater.process(add(1, descriptor, "foo"));
updater.process(add(2, descriptor, "bar"));
updater.process(add(3, descriptor, "qux"));
verify(writer).updateDocument(newTermForChangeOrRemove(1), LuceneDocumentStructure.documentRepresentingProperties((long) 1, "foo"));
verify(writer).updateDocument(newTermForChangeOrRemove(2), LuceneDocumentStructure.documentRepresentingProperties((long) 2, "bar"));
verify(writer).updateDocument(newTermForChangeOrRemove(3), LuceneDocumentStructure.documentRepresentingProperties((long) 3, "qux"));
}
Aggregations