Search in sources :

Example 1 with StatementResult

use of org.neo4j.driver.v1.StatementResult in project neo4j by neo4j.

the class ProcedureTest method calls_simplistic_procedure.

@Test
public void calls_simplistic_procedure() {
    try (Driver driver = GraphDatabase.driver(graphDb.boltURI(), configuration());
        Session session = driver.session()) {
        StatementResult result = session.run("CALL " + procedureNamespace + ".theAnswer()");
        assertThat(result.single().get("value").asLong()).isEqualTo(42L);
    }
}
Also used : StatementResult(org.neo4j.driver.v1.StatementResult) Driver(org.neo4j.driver.v1.Driver) Session(org.neo4j.driver.v1.Session) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Driver (org.neo4j.driver.v1.Driver)1 Session (org.neo4j.driver.v1.Session)1 StatementResult (org.neo4j.driver.v1.StatementResult)1