예제 #1
0
 @Test
 @Override
 public void canDelete() {
   EzeeLeaseTenant tenant =
       new EzeeLeaseTenant(
           "TEST_LEASE_TENANT",
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           "23/10/1970",
           null);
   TestCase.assertNull(tenant.getId());
   dao.save(tenant);
   TestCase.assertNotNull(tenant.getId());
   dao.delete(tenant);
   EzeeLeaseTenant persisted = dao.get(tenant.getId(), EzeeLeaseTenant.class);
   TestCase.assertNull(persisted);
 }
예제 #2
0
 @Test
 @Override
 public void canEdit() {
   EzeeLeaseTenant tenant =
       new EzeeLeaseTenant(
           "TEST_LEASE_TENANT",
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           "23/10/1970",
           null);
   TestCase.assertNull(tenant.getId());
   dao.save(tenant);
   TestCase.assertNotNull(tenant.getId());
   tenant.setUpdated("15/11/2019");
   dao.save(tenant);
   EzeeLeaseTenant persisted = dao.get(tenant.getId(), EzeeLeaseTenant.class);
   TestCase.assertNotNull(persisted.getUpdated());
   TestCase.assertEquals("15/11/2019", persisted.getUpdated());
 }
예제 #3
0
 @Test
 @Override
 public void canPersist() {
   EzeeLeaseTenant tenant =
       new EzeeLeaseTenant(
           "TEST_LEASE_TENANT",
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           EMPTY_STRING,
           "23/10/1970",
           null);
   TestCase.assertNull(tenant.getId());
   dao.save(tenant);
   TestCase.assertNotNull(tenant.getId());
 }