public void testAddGroupToRole() { createRole(); try { roleDAO.addGroupToRole(group, role); assertTrue(roleDAO.getRolesForGroupName(group.getGroupName()).contains(role)); } catch (DataAccessException e) { rollback(); } rollback(); }
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(); }