Database Reference
In-Depth Information
Note
In case any of these dependencies already exist in your pom.xml file, then just
update the version of the package defined in <version> tag.
3. Create a package neo4j.tests and a Java class Neo4jTest.java under
src/test/java and add following code:
package neo4j.tests;
import org.junit.After;
import org.junit.Before;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.test.TestGraphDatabaseFactory;
public class Neo4jTest {
private GraphDatabaseService graphDb;
@Before
public void createTestDatabase() throws Exception{
try {
System.out.println("Set up Invoked");
graphDb = new
TestGraphDatabaseFactory().newImpermanentDatabase();
} catch (Exception e) {
System.err.println("Cannot setup the Test
Database....check Logs for Stack Traces");
throw e;
}
}
@After
public void cleanupTestDatabase() throws Exception {
try {
System.out.println("Clean up Invoked");
graphDb.shutdown();
Search WWH ::




Custom Search