예제 #1
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()));
 }
예제 #2
0
 private void doImport(CurrencyDao dao, Currency currency) {
   with(
       zip -> {
         JsonImport jImport = new JsonImport(zip, Tests.getDb());
         jImport.run();
       });
   Assert.assertTrue(dao.contains(currency.getRefId()));
   Currency clone = dao.getForRefId(currency.getRefId());
   Assert.assertEquals(currency.getName(), clone.getName());
 }