@Test public void D_addRimborsoKmtest() throws Exception { RimborsoKm rimborsoKm = new RimborsoKm(); rimborsoKm.setId("02"); rimborsoKm.setValue(0.36); rimborsoKmDAO.persist(rimborsoKm); }
@Test public void C_updateRimborsoKmTest() throws Exception { RimborsoKm rimborsoKm = rimborsoKmDAO .findRimborsoKmByQuery( IRimborsoKmSearchBuilder.RimborsoKmSearchBuilder.getRimborsoKmSearchBuilder()) .getResults() .get(0); rimborsoKm.setValue(0.40); Thread.sleep(1000); rimborsoKmDAO.update(rimborsoKm); Thread.sleep(1000); logger.debug( "############################NUMBER_ALL_RIMBORSO_KM: {}\n", rimborsoKmDAO.count().intValue()); IRimborsoKmSearchBuilder rimborsoKmSearchBuilder = IRimborsoKmSearchBuilder.RimborsoKmSearchBuilder.getRimborsoKmSearchBuilder(); List<RimborsoKm> lista = rimborsoKmDAO.findRimborsoKmByQuery(rimborsoKmSearchBuilder).getResults(); Assert.assertTrue("FIND RIMBORSO KM", lista.size() == 1); }