use of org.neo4j.harness.internal.InProcessNeo4j in project neo4j by neo4j.
the class Neo4jRuleTest method getHttpsUriFromNeo4jRule.
private static URI getHttpsUriFromNeo4jRule(URI configuredHttpsUri) throws Throwable {
InProcessNeo4j neo4J = mock(InProcessNeo4j.class);
when(neo4J.httpsURI()).thenReturn(configuredHttpsUri);
Neo4jBuilder serverBuilder = mock(Neo4jBuilder.class);
when(serverBuilder.build()).thenReturn(neo4J);
Neo4jRule rule = new Neo4jRule(serverBuilder);
AtomicReference<URI> uriRef = new AtomicReference<>();
Statement statement = rule.apply(new Statement() {
@Override
public void evaluate() {
uriRef.set(rule.httpsURI());
}
}, null);
statement.evaluate();
return uriRef.get();
}
use of org.neo4j.harness.internal.InProcessNeo4j in project neo4j by neo4j.
the class Neo4jExtension method afterAll.
@Override
public void afterAll(ExtensionContext context) {
ExtensionContext.Store store = context.getStore(NAMESPACE);
store.remove(GraphDatabaseService.class);
store.remove(DatabaseManagementService.class);
InProcessNeo4j controls = store.remove(Neo4j.class, InProcessNeo4j.class);
controls.close();
}
use of org.neo4j.harness.internal.InProcessNeo4j in project neo4j by neo4j.
the class Neo4jExtension method destroyService.
private static void destroyService(ExtensionContext context) {
ExtensionContext.Store store = getStore(context);
store.remove(GraphDatabaseService.class);
store.remove(DatabaseManagementService.class);
InProcessNeo4j controls = store.remove(Neo4j.class, InProcessNeo4j.class);
controls.close();
}
Aggregations