Reputation: 234
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
Reputation: 45123
One of the option is to use GraphAware Test - https://github.com/graphaware/neo4j-framework/tree/master/tests
Upvotes: 1
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