@SuppressWarnings("unchecked") @Override protected void setUp() throws Exception { super.setUp(); try { Constructor<T> constructor = daoMasterClass.getConstructor(Database.class); daoMaster = constructor.newInstance(db); Method createTableMethod = daoMasterClass.getMethod("createAllTables", Database.class, boolean.class); createTableMethod.invoke(null, db, false); } catch (Exception e) { throw new RuntimeException("Could not prepare DAO session test", e); } daoSession = (S) daoMaster.newSession(); }
@Override protected void setUp() throws Exception { super.setUp(); MyApp.onCreateCounterStatic = 0; MyApp.onTerminateCounterStatic = 0; }
@SuppressWarnings("unchecked") @Override protected void setUp() throws Exception { super.setUp(); try { setUpTableForDao(); daoAccess = new InternalUnitTestDaoAccess<T, K>(db, (Class<AbstractDao<T, K>>) daoClass, identityScopeForDao); dao = (D) daoAccess.getDao(); } catch (Exception e) { throw new RuntimeException("Could not prepare DAO Test", e); } }
@SuppressWarnings("unchecked") @Override protected void setUp() throws Exception { super.setUp(); try { Constructor<T> constructor = daoMasterClass.getConstructor(Database.class); daoMaster = constructor.newInstance(db); Method createTableMethod = daoMasterClass.getMethod("createAllTables", Database.class, boolean.class); createTableMethod.invoke(null, db, false); } catch (Exception e) { throw new RuntimeException("Could not prepare DAO session test", e); } daoSession = (S) daoMaster.newSession(); }
@SuppressWarnings("unchecked") @Override protected void setUp() throws Exception { super.setUp(); try { setUpTableForDao(); daoAccess = new InternalUnitTestDaoAccess<T, K>(db, (Class<AbstractDao<T, K>>) daoClass, identityScopeForDao); dao = (D) daoAccess.getDao(); } catch (Exception e) { throw new RuntimeException("Could not prepare DAO Test", e); } }