mnouh1
mnouh1

Reputation: 234

Neo4j Unit Testing through JDBC-Client

My project is currently using the Neo4J-JDBC client and I wish to test the client side queries through the JDBC-Client.

Previously you can start a Neo4j Server on a specific port like this:

Deprecated:

    CommunityServer server = CommunityServerBuilder.server().onPort(port).build();
    final WebServer webServer = server.getWebServer();
    server.start()

What is the new way of doing the above without using any of the deprecated methods/classes?

Upvotes: 2

Views: 54

Answers (2)

MicTech
MicTech

Reputation: 45123

One of the option is to use GraphAware Test - https://github.com/graphaware/neo4j-framework/tree/master/tests

Upvotes: 1

Stefan Armbruster
Stefan Armbruster

Reputation: 39925

Since 2.2 you can spawn a in-process Neo4j server using TestServiceBuilder and Neo4jRule, see http://neo4j.com/docs/stable/server-unmanaged-extensions-testing.html for details. Instead of using http directly in your tests, you can use the JDBC driver instead.

Upvotes: 1

Related Questions