@After public final void stopDatabase() { if (dbConnector != null) { dbConnector.stop(); session.stop(); } }
@Before public final void startDatabase() throws Exception { if (dbConnector == null) { dbConnector = new MemoryDatabaseConnector(); dbConnector.start(); session = new JpaDatabaseSession(dbConnector); session.start(); } databaseTester = new JdbcDatabaseTester( MemoryDatabaseConnector.DRIVER, MemoryDatabaseConnector.URL, MemoryDatabaseConnector.USER, MemoryDatabaseConnector.PASSWORD); databaseTester.onTearDown(); }