use of org.neo4j.kernel.extension.GlobalExtensions in project neo4j by neo4j.
the class TestExtension method dependenciesCanBeRetrieved.
/**
* Check that dependencies can be accessed
*/
@Test
void dependenciesCanBeRetrieved() {
GraphDatabaseAPI graphdb = graphDb();
try {
GlobalExtensions globalExtensions = graphdb.getDependencyResolver().resolveDependency(GlobalExtensions.class);
assertNotNull(globalExtensions.resolveDependency(DummyExtension.class).getDependencies().getConfig());
assertEquals(graphdb.getDependencyResolver().resolveDependency(DatabaseManager.class), globalExtensions.resolveDependency(DummyExtension.class).getDependencies().getDatabaseManager());
} finally {
managementService.shutdown();
}
}
Aggregations