public class InProcessServerBuilder extends Object implements TestServerBuilder
| Constructor and Description |
|---|
InProcessServerBuilder(File workingDir) |
| Modifier and Type | Method and Description |
|---|---|
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(String fixtureStatement)
Data fixture to inject upon server start.
|
public InProcessServerBuilder(File workingDir)
public 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 statementCopyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.