public abstract class AbstractInProcessServerBuilder extends Object implements TestServerBuilder
| Constructor and Description |
|---|
AbstractInProcessServerBuilder(File workingDir) |
| Modifier and Type | Method and Description |
|---|---|
TestServerBuilder |
copyFrom(File originalStoreDir)
Pre-populate the server with a database copied from the specified directory
|
ServerControls |
newServer()
Start a new server.
|
TestServerBuilder |
withConfig(org.neo4j.graphdb.config.Setting<?> key,
String value)
Configure the Neo4j instance.
|
TestServerBuilder |
withConfig(String key,
String value) |
TestServerBuilder |
withExtension(String mountPath,
Class<?> extension)
Shortcut for configuring the server to use an unmanaged extension.
|
TestServerBuilder |
withExtension(String mountPath,
String packageName)
Shortcut for configuring the server to find and mount all unmanaged extensions in the given package.
|
TestServerBuilder |
withFixture(File cypherFileOrDirectory)
Data fixtures to inject upon server start.
|
TestServerBuilder |
withFixture(Function<org.neo4j.graphdb.GraphDatabaseService,Void> fixtureFunction)
Data fixture to inject upon server start.
|
TestServerBuilder |
withFixture(String fixtureStatement)
Data fixture to inject upon server start.
|
TestServerBuilder |
withFunction(Class<?> functionClass)
Configure the server to load the specified function definition class.
|
TestServerBuilder |
withProcedure(Class<?> procedureClass)
Configure the server to load the specified procedure definition class.
|
public AbstractInProcessServerBuilder(File workingDir)
public TestServerBuilder copyFrom(File originalStoreDir)
TestServerBuildercopyFrom in interface TestServerBuilderoriginalStoreDir - the directory to copy frompublic ServerControls newServer()
TestServerBuilderServerControls.httpURI() method. You could also specify explicit ports using the
TestServerBuilder.withConfig(org.neo4j.graphdb.config.Setting, String) method. Please refer to the Neo4j Manual for
details on available configuration options.
When the returned controls are closed, the temporary directory the server used
will be removed as well.newServer in interface TestServerBuilderpublic TestServerBuilder withConfig(org.neo4j.graphdb.config.Setting<?> key, String value)
TestServerBuilderwithConfig in interface TestServerBuilderkey - the config keyvalue - the config valuepublic TestServerBuilder withConfig(String key, String value)
withConfig in interface TestServerBuilderTestServerBuilder.withConfig(org.neo4j.graphdb.config.Setting, String)public TestServerBuilder withExtension(String mountPath, Class<?> extension)
TestServerBuilderwithExtension in interface TestServerBuildermountPath - the http path, relative to the server base URI, that this extension should be mounted at.extension - the extension class.public TestServerBuilder withExtension(String mountPath, String packageName)
TestServerBuilderwithExtension in interface TestServerBuildermountPath - the http path, relative to the server base URI, that this extension should be mounted at.packageName - a java package with extension classes.TestServerBuilder.withExtension(String, Class)public TestServerBuilder withFixture(File cypherFileOrDirectory)
TestServerBuilderwithFixture in interface TestServerBuildercypherFileOrDirectory - file with cypher statement, or directory containing ".cyp"-suffixed files.public TestServerBuilder withFixture(String fixtureStatement)
TestServerBuilderwithFixture in interface TestServerBuilderfixtureStatement - a cypher statementpublic TestServerBuilder withFixture(Function<org.neo4j.graphdb.GraphDatabaseService,Void> fixtureFunction)
TestServerBuilderGraphDatabaseService instancewithFixture in interface TestServerBuilderfixtureFunction - a fixture functionpublic TestServerBuilder withProcedure(Class<?> procedureClass)
TestServerBuilderProcedure, these will become available to call through
cypher.withProcedure in interface TestServerBuilderprocedureClass - a class containing one or more procedure definitionspublic TestServerBuilder withFunction(Class<?> functionClass)
TestServerBuilderUserFunction, these will become available to call through
cypher.withFunction in interface TestServerBuilderfunctionClass - a class containing one or more function definitionsCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.