@Test
 public void testDeleteUser() throws Exception {
   LOGGER.debug("test: DeleteUser");
   List<User> users = userDao.getAllUsers();
   Integer usersSize = users.size();
   assertTrue(users.size() > 0);
   userDao.deleteUser(users.get(0).getId_user());
   assertTrue(usersSize - 1 == userDao.getAllUsers().size());
 }
 @Test
 public void testGetAllUsers() throws Exception {
   LOGGER.debug("test: getAllUsers");
   List<User> users = userDao.getAllUsers();
   LOGGER.debug(">> Lastname 1 = {} ", users.get(0).getLastname());
   LOGGER.debug(">> Lastname 2 = {} ", users.get(1).getLastname());
   assertTrue(users.size() == 2);
 }
Exemple #3
0
 public void testGetAllForAccount() throws Exception {
   List<User> list = dao.getAllUsers(1L);
   assertTrue(list.size() == 4);
 }
  public List<AppUser> getAllUsers() {

    return userDao.getAllUsers();
  }