use of org.neo4j.server.rest.domain.GraphDbHelper in project neo4j by neo4j.
the class RestfulGraphDatabaseTest method doBefore.
@BeforeClass
public static void doBefore() 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);
service = new TransactionWrappingRestfulGraphDatabase(graph, new RestfulGraphDatabase(new JsonFormat(), output, new DatabaseActions(new LeaseManager(Clocks.fakeClock()), true, database.getGraph()), new ConfigAdapter(Config.embeddedDefaults())));
}
use of org.neo4j.server.rest.domain.GraphDbHelper in project neo4j by neo4j.
the class PagingTraversalTest method startDatabase.
@Before
public void startDatabase() throws IOException {
graph = (GraphDatabaseFacade) new TestGraphDatabaseFactory().newImpermanentDatabase();
database = new WrappedDatabase(graph);
helper = new GraphDbHelper(database);
EntityOutputFormat 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);
}
use of org.neo4j.server.rest.domain.GraphDbHelper in project neo4j by neo4j.
the class DatabaseActionsTest method createDb.
@BeforeClass
public static void createDb() throws IOException {
graph = (GraphDatabaseFacade) new TestGraphDatabaseFactory().newImpermanentDatabase();
database = new WrappedDatabase(graph);
graphdbHelper = new GraphDbHelper(database);
actions = new TransactionWrappedDatabaseActions(new LeaseManager(Clocks.fakeClock()), database.getGraph());
}
use of org.neo4j.server.rest.domain.GraphDbHelper in project neo4j by neo4j.
the class DatabaseActionsTest method nodeInDatabaseShouldBeRetrievable.
@Test
public void nodeInDatabaseShouldBeRetrievable() throws NodeNotFoundException {
long nodeId = new GraphDbHelper(database).createNode();
assertNotNull(actions.getNode(nodeId));
}
use of org.neo4j.server.rest.domain.GraphDbHelper in project neo4j by neo4j.
the class SetRelationshipPropertiesIT method setupTheDatabase.
@Before
public void setupTheDatabase() throws Exception {
long relationshipId = new GraphDbHelper(server().getDatabase()).createRelationship("KNOWS");
propertiesUri = new URI(functionalTestHelper.relationshipPropertiesUri(relationshipId));
badUri = new URI(functionalTestHelper.relationshipPropertiesUri(relationshipId + 1 * 99999));
}
Aggregations