Search in sources :

Example 6 with GraphDbHelper

use of org.neo4j.server.rest.domain.GraphDbHelper in project neo4j by neo4j.

the class RestfulGraphDatabasePagedTraversalTest method startDatabase.

@Before
public void startDatabase() throws IOException {
    graph = (GraphDatabaseFacade) new TestGraphDatabaseFactory().newImpermanentDatabase();
    database = new WrappedDatabase(graph);
    helper = new GraphDbHelper(database);
    output = new EntityOutputFormat(new JsonFormat(), URI.create(BASE_URI), null);
    leaseManager = new LeaseManager(Clocks.fakeClock());
    service = new RestfulGraphDatabase(new JsonFormat(), output, new DatabaseActions(leaseManager, true, database.getGraph()), null);
    service = new TransactionWrappingRestfulGraphDatabase(graph, service);
}
Also used : GraphDbHelper(org.neo4j.server.rest.domain.GraphDbHelper) JsonFormat(org.neo4j.server.rest.repr.formats.JsonFormat) LeaseManager(org.neo4j.server.rest.paging.LeaseManager) TestGraphDatabaseFactory(org.neo4j.test.TestGraphDatabaseFactory) WrappedDatabase(org.neo4j.server.database.WrappedDatabase) EntityOutputFormat(org.neo4j.test.server.EntityOutputFormat) Before(org.junit.Before)

Aggregations

GraphDbHelper (org.neo4j.server.rest.domain.GraphDbHelper)6 WrappedDatabase (org.neo4j.server.database.WrappedDatabase)4 LeaseManager (org.neo4j.server.rest.paging.LeaseManager)4 TestGraphDatabaseFactory (org.neo4j.test.TestGraphDatabaseFactory)4 Before (org.junit.Before)3 JsonFormat (org.neo4j.server.rest.repr.formats.JsonFormat)3 EntityOutputFormat (org.neo4j.test.server.EntityOutputFormat)3 BeforeClass (org.junit.BeforeClass)2 URI (java.net.URI)1 Test (org.junit.Test)1 ConfigAdapter (org.neo4j.server.plugins.ConfigAdapter)1 NodeRepresentationTest (org.neo4j.server.rest.repr.NodeRepresentationTest)1 RelationshipRepresentationTest (org.neo4j.server.rest.repr.RelationshipRepresentationTest)1