use of io.divide.dao.orientdb.OrientDBDao in project divide by HiddenStage.
the class TestUtils method setUp.
public static TestWrapper setUp() {
TestWrapper container = new TestWrapper();
container.time = System.nanoTime();
container.db = new ODatabaseDocumentTx(OrientDBDao.DEFAULT_CONFIG);
if (container.db.exists()) {
container.db.open("admin", "admin");
} else {
container.db.create();
}
container.serverDao = new OrientDBDao((ODatabaseDocument) container.db);
try {
container.serverDao.query(new QueryBuilder().delete().from(Credentials.class).build());
} catch (ServerDAO.DAOException e) {
e.printStackTrace();
}
container.app = new TestApplication(container.serverDao);
return container;
}
Aggregations