use of org.neo4j.server.rest.repr.NodeRepresentation in project neo4j by neo4j.
the class StreamingJsonFormatTest method canFormatNode.
@Test
void canFormatNode() {
DatabaseManagementService managementService = new TestDatabaseManagementServiceBuilder().impermanent().build();
GraphDatabaseService db = managementService.database(DEFAULT_DATABASE_NAME);
try (Transaction transaction = db.beginTx()) {
final Node n = transaction.createNode();
json.assemble(new NodeRepresentation(n));
} finally {
managementService.shutdown();
}
assertTrue(stream.toString().contains("\"self\" : \"http://localhost/node/0\","));
}
Aggregations