コード例 #1
0
 @Test
 public void l_backupPrenotazioneTest() throws Exception {
   int count = this.prenotazioneDAO.count().intValue();
   List<Prenotazione> lista = this.prenotazioneDAO.find(new Page(0, count)).getResults();
   IBackupStore<Prenotazione> conf = new IBackupStore.PrenotazioneBackupStore();
   conf.setList(lista);
   mapper.enable(SerializationFeature.INDENT_OUTPUT);
   mapper.writeValue(new File("./backup/PrenotazioneBackup.json"), conf);
   Assert.assertTrue("############BACKUP_PRENOTAZIONE", conf.getList().size() == count);
 }
コード例 #2
0
 @Test
 public void c_backupMassimaleTest() throws Exception {
   int count = this.massimaleDAO.count().intValue();
   List<Massimale> lista = this.massimaleDAO.find(new Page(0, count)).getResults();
   IBackupStore<Massimale> conf = new MassimaleBackupStore();
   conf.setList(lista);
   mapper.enable(SerializationFeature.INDENT_OUTPUT);
   mapper.writeValue(new File("./backup/MassimaleBackup.json"), conf);
   Assert.assertTrue("############BACKUP_MASSIMALE", conf.getList().size() == count);
 }
コード例 #3
0
 @Test
 public void m_backupVeicoloCnrTest() throws Exception {
   int count = this.veicoloCNRDAO.count().intValue();
   List<VeicoloCNR> lista = this.veicoloCNRDAO.find(new Page(0, count)).getResults();
   IBackupStore<VeicoloCNR> conf = new IBackupStore.VeicoloCnrBackupStore();
   conf.setList(lista);
   mapper.enable(SerializationFeature.INDENT_OUTPUT);
   mapper.writeValue(new File("./backup/VeicoloCnrBackup.json"), conf);
   Assert.assertTrue("############BACKUP_VEICOLO_CNR", conf.getList().size() == count);
 }
コード例 #4
0
 @Test
 public void h_backupUserTest() throws Exception {
   int count = this.userDAO.count().intValue();
   List<User> lista = this.userDAO.find(new Page(0, count)).getResults();
   IBackupStore<User> conf = new IBackupStore.UserBackupStore();
   conf.setList(lista);
   mapper.enable(SerializationFeature.INDENT_OUTPUT);
   mapper.writeValue(new File("./backup/UserBackup.json"), conf);
   Assert.assertTrue("############BACKUP_USER", conf.getList().size() == count);
 }
コード例 #5
0
 @Test
 public void g_backupRimborsoKmTest() throws Exception {
   int count = this.rimborsoKmDAO.count().intValue();
   List<RimborsoKm> lista = this.rimborsoKmDAO.find(new Page(0, count)).getResults();
   IBackupStore<RimborsoKm> conf = new RimborsoKmBackupStore();
   conf.setList(lista);
   mapper.enable(SerializationFeature.INDENT_OUTPUT);
   mapper.writeValue(new File("./backup/RimborsoKmBackup.json"), conf);
   Assert.assertTrue("############BACKUP_RIMBORSO_KM", conf.getList().size() == count);
 }
コード例 #6
0
 @Test
 public void d_backupDirettoreTest() throws Exception {
   int count = this.direttoreDAO.count().intValue();
   List<Direttore> lista = this.direttoreDAO.find(new Page(0, count)).getResults();
   IBackupStore<Direttore> conf = new DirettoreBackupStore();
   conf.setList(lista);
   mapper.enable(SerializationFeature.INDENT_OUTPUT);
   mapper.writeValue(new File("./backup/DirettoreBackup.json"), conf);
   Assert.assertTrue("############BACKUP_DIRETTORE", conf.getList().size() == count);
 }
コード例 #7
0
 @Test
 public void b_backupTipologiaSpesaTest() throws Exception {
   int count = this.tipologiaSpesaDAO.count().intValue();
   List<TipologiaSpesa> lista = this.tipologiaSpesaDAO.find(new Page(0, count)).getResults();
   IBackupStore<TipologiaSpesa> conf = new TipologiaSpesaBackupStore();
   conf.setList(lista);
   mapper.enable(SerializationFeature.INDENT_OUTPUT);
   mapper.writeValue(new File("./backup/TipologiaSpesaBackup.json"), conf);
   Assert.assertTrue("############BACKUP_TIPOLOGIA_SPESA", conf.getList().size() == count);
 }
コード例 #8
0
 // @Ignore
 @Test
 public void v_readMissioneBackupTest() throws Exception {
   IBackupStore<Missione> conf =
       mapper.readValue(new File("./backup/MissioneBackup.json"), MissioneBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@MISSIONE: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_MISSIONE", conf.getList().size() == this.missioneDAO.count().intValue());
 }
コード例 #9
0
 @Ignore
 @Test
 public void u_readUserBackupTest() throws Exception {
   IBackupStore<User> conf =
       mapper.readValue(new File("./backup/UserBackup.json"), UserBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@USER: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_USER", conf.getList().size() == this.userDAO.count().intValue());
 }
コード例 #10
0
 @Ignore
 @Test
 public void r_readUrlImageBackupTest() throws Exception {
   IBackupStore<UrlImage> conf =
       mapper.readValue(new File("./backup/UrlImageBackup.json"), UrlImageBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@URL IMAGE: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_URL_IMAGE", conf.getList().size() == this.urlImageDAO.count().intValue());
 }
コード例 #11
0
 @Ignore
 @Test
 public void n_readNazioneBackupTest() throws Exception {
   IBackupStore<Nazione> conf =
       mapper.readValue(new File("./backup/NazioneBackup.json"), NazioneBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@NAZIONE: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_NAZIONE", conf.getList().size() == this.nazioneDAO.count().intValue());
 }
コード例 #12
0
 @Ignore
 @Test
 public void t_readRimborsoKmBackupTest() throws Exception {
   IBackupStore<RimborsoKm> conf =
       mapper.readValue(new File("./backup/RimborsoKmBackup.json"), RimborsoKmBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@RIMBORSO KM: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_RIMBORSO_KM",
       conf.getList().size() == this.rimborsoKmDAO.count().intValue());
 }
コード例 #13
0
 @Ignore
 @Test
 public void s_readQualificaBackupTest() throws Exception {
   IBackupStore<QualificaUser> conf =
       mapper.readValue(new File("./backup/QualificaUserBackup.json"), QualificaBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@QUALIFICA: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_QUALIFICA",
       conf.getList().size() == this.qualificaUserDAO.count().intValue());
 }
コード例 #14
0
 @Ignore
 @Test
 public void q_readDirettoreBackupTest() throws Exception {
   IBackupStore<Direttore> conf =
       mapper.readValue(new File("./backup/DirettoreBackup.json"), DirettoreBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@DIRETTORE: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_DIRETTORE",
       conf.getList().size() == this.direttoreDAO.count().intValue());
 }
コード例 #15
0
 @Ignore
 @Test
 public void p_readMassimaleBackupTest() throws Exception {
   IBackupStore<Massimale> conf =
       mapper.readValue(new File("./backup/MassimaleBackup.json"), MassimaleBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@MASSIMALE: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_MASSIMALE",
       conf.getList().size() == this.massimaleDAO.count().intValue());
 }
コード例 #16
0
 @Ignore
 @Test
 public void y_readVeicoloCnrBackupTest() throws Exception {
   IBackupStore<VeicoloCNR> conf =
       mapper.readValue(new File("./backup/VeicoloCnrBackup.json"), VeicoloCnrBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@VEICOLO CNR: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_VEICOLO_CNR",
       conf.getList().size() == this.veicoloCNRDAO.count().intValue());
 }
コード例 #17
0
 @Ignore
 @Test
 public void o_readTipologiaSpesaBackupTest() throws Exception {
   IBackupStore<TipologiaSpesa> conf =
       mapper.readValue(
           new File("./backup/TipologiaSpesaBackup.json"), TipologiaSpesaBackupStore.class);
   conf.getList()
       .stream()
       .forEach(
           f -> {
             logger.info("@@@@@@@@@@@@@@TIPOLOGIA SPESA: {}\n", f);
           });
   Assert.assertTrue(
       "############READ_TIPOLOGIA_SPESA",
       conf.getList().size() == this.tipologiaSpesaDAO.count().intValue());
 }