public interface TestServerBuilder
| Modifier and Type | Method and Description |
|---|---|
TestServerBuilder |
copyFrom(File sourceDirectory)
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.
|
ServerControls newServer()
ServerControls.httpURI() method. You could also specify explicit ports using the
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.TestServerBuilder withConfig(org.neo4j.graphdb.config.Setting<?> key, String value)
key - the config keyvalue - the config valueTestServerBuilder withConfig(String key, String value)
TestServerBuilder withExtension(String mountPath, Class<?> extension)
mountPath - the http path, relative to the server base URI, that this extension should be mounted at.extension - the extension class.TestServerBuilder withExtension(String mountPath, String packageName)
mountPath - the http path, relative to the server base URI, that this extension should be mounted at.packageName - a java package with extension classes.withExtension(String, Class)TestServerBuilder withFixture(File cypherFileOrDirectory)
cypherFileOrDirectory - file with cypher statement, or directory containing ".cyp"-suffixed files.TestServerBuilder withFixture(String fixtureStatement)
fixtureStatement - a cypher statementTestServerBuilder withFixture(Function<org.neo4j.graphdb.GraphDatabaseService,Void> fixtureFunction)
GraphDatabaseService instancefixtureFunction - a fixture functionTestServerBuilder copyFrom(File sourceDirectory)
sourceDirectory - the directory to copy fromTestServerBuilder withProcedure(Class<?> procedureClass)
Procedure, these will become available to call through
cypher.procedureClass - a class containing one or more procedure definitionsTestServerBuilder withFunction(Class<?> functionClass)
UserFunction, these will become available to call through
cypher.functionClass - a class containing one or more function definitionsCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.