Considering friendship-strength-counter-module example, if I have developed some user-defined functions in the same project, how can I register them to the embedded database in the test code?
The examples I've found on how to write tests for UDFs take a different approach to setup an embedded database than in the examples here. They use
public class UdfTest
{
@Rule
public Neo4jRule neo4j = new Neo4jRule()
.withFunction(Udf.class);
@Test
public void someTest() throws Throwable
{
try (Driver driver = GraphDatabase.driver(neo4j.boltURI(), Config.build().withEncryptionLevel(Config.EncryptionLevel.NONE).toConfig())) {
Session session = driver.session();
long nodeId = session.run( "MATCH (n) RETURN myFunc(n)" )
.single()
.get(0).asLong();
assertEquals(nodeId, 1);
}
}
}
How can I setup an embedded database in the test code adding a new module to Neo4j and some UDFs at the same time?
Considering friendship-strength-counter-module example, if I have developed some user-defined functions in the same project, how can I register them to the embedded database in the test code?
The examples I've found on how to write tests for UDFs take a different approach to setup an embedded database than in the examples here. They use
How can I setup an embedded database in the test code adding a new module to Neo4j and some UDFs at the same time?