@Test
public void test() {
Database.initializeDB();
try {
ConnectionSource connectionSource = new JdbcConnectionSource("jdbc:h2:file:" + Database.dbFileName);
Dao<Show, Integer> showDao = DaoManager.createDao(connectionSource, Show.class);
Dao<Season, Integer> seasonDao = DaoManager.createDao(connectionSource, Season.class);
Dao<Episode, Integer> episodeDao = DaoManager.createDao(connectionSource, Episode.class);
Dao<Feed, Integer> feedDao = DaoManager.createDao(connectionSource, Feed.class);
Dao<Settings, Integer> settingsDao = DaoManager.createDao(connectionSource, Settings.class);
Dao<Search, Integer> searchDao = DaoManager.createDao(connectionSource, Search.class);
//TableUtils.dropTable(connectionSource, Show.class, true);
//TableUtils.dropTable(connectionSource, Season.class, true);
//TableUtils.dropTable(connectionSource, Episode.class, true);
TableUtils.dropTable(connectionSource, Settings.class, true);
TableUtils.dropTable(connectionSource, Feed.class, true);
TableUtils.dropTable(connectionSource, Search.class, true);
assertFalse(feedDao.isTableExists());
assertFalse(showDao.isTableExists());
assertFalse(seasonDao.isTableExists());
assertFalse(episodeDao.isTableExists());
assertFalse(settingsDao.isTableExists());
assertFalse(searchDao.isTableExists());
connectionSource.close();
} catch (SQLException e) {
e.printStackTrace();
}
}