コード例 #1
0
 /** Test if the modification of an entity has been correctly done */
 @Test
 public void testUpdateMaintenance() {
   noneMaintenance.setName("Very full");
   maintenanceDAO.updateMaintenance(noneMaintenance);
   assertEquals("Very full", maintenanceDAO.findById(noneMaintenanceId).getName());
 }
コード例 #2
0
 /**
  * Test the deletion of an {@link Maintenance}. We check that the deleted {@link Maintenance}
  * can't be found.
  */
 @Test
 public void testDeleteMaintenance() {
   maintenanceDAO.deleteMaintenance(noneMaintenance);
   assertNull(maintenanceDAO.findById(noneMaintenanceId));
 }
コード例 #3
0
 /** Test if an {@link Maintenance} can be found by his ID */
 @Test
 public void testFindById() {
   assertEquals(fullMaintenance, maintenanceDAO.findById(fullMaintenanceId));
 }
コード例 #4
0
 /** {@inheritDoc} */
 @Override
 public void setAsText(String text) {
   setValue((text == null) ? null : maintenanceDAO.findById(Long.parseLong(text)));
 }