コード例 #1
0
 @Test
 public void testCurrency() throws Exception {
   CurrencyDao dao = new CurrencyDao(Tests.getDb());
   Currency currency = createModel(dao);
   doExport(currency, dao);
   doImport(dao, currency);
   dao.delete(currency);
 }
コード例 #2
0
 private void doExport(Currency currency, CurrencyDao dao) {
   with(
       zip -> {
         JsonExport export = new JsonExport(Tests.getDb(), zip);
         export.write(currency);
       });
   dao.delete(currency);
   Assert.assertFalse(dao.contains(currency.getRefId()));
 }