Esempio n. 1
0
 public void testAddGroupToRole() {
   createRole();
   try {
     roleDAO.addGroupToRole(group, role);
     assertTrue(roleDAO.getRolesForGroupName(group.getGroupName()).contains(role));
   } catch (DataAccessException e) {
     rollback();
   }
   rollback();
 }
Esempio n. 2
0
  public void testRemoveGroupFromRole() {
    System.out.println("one");
    createRole();

    try {
      roleDAO.addGroupToRole(group, role);
      assertTrue(roleDAO.getRolesForGroupName(group.getGroupName()).contains(role));
      roleDAO.removeGroupFromRole(group, role);
      assertFalse(roleDAO.getRolesForGroupName(group.getGroupName()).contains(role));
    } catch (DataAccessException e) {
      e.printStackTrace();
      rollback();
      fail();
    }
    rollback();
  }