use of org.neo4j.graphdb.schema.IndexType.LOOKUP in project neo4j by neo4j.
the class ImportCommandTest method assertTokenIndexesCreated.
private void assertTokenIndexesCreated() {
DatabaseManagementService dbms = dbmsService();
try (var tx = dbms.database(DEFAULT_DATABASE_NAME).beginTx()) {
var indexes = stream(tx.schema().getIndexes().spliterator(), false).collect(toList());
assertThat(indexes.stream().filter(index -> index.getIndexType() == LOOKUP).count()).isEqualTo(2);
assertTrue(indexes.stream().anyMatch(IndexDefinition::isNodeIndex));
assertTrue(indexes.stream().anyMatch(IndexDefinition::isRelationshipIndex));
} finally {
dbms.shutdown();
}
}
Aggregations