@After public void tearDown() throws Exception { // truncate db factory.getDb().command(new OCommandSQL("truncate class Pictogram")).execute(); // close db try { factory.getDb().close(); } catch (Exception e) { // do nothing } }
@Before public void setUp() throws Exception { // set up schema if needed orientDBTestInstance.setUpSchemaIfNeeded(); // open database ODatabaseDocumentTx db = orientDBTestInstance.getDatabase(); factory = new OrientDbRepositoryFactory(db, new OrientDbTestApplicationSettings(), new Identity()); // create repository repository = factory.produceRepository(OrientDbPictogramRepository.class); }