use of org.apache.directory.fortress.core.GroupMgr in project directory-fortress-core by apache.
the class GroupAntTest method findGroups.
private void findGroups(String msg, List<Group> inGroups) {
LogUtil.logIt(msg);
try {
GroupMgr groupMgr = GroupMgrFactory.createInstance();
List<Group> outGroups = groupMgr.find(new Group("t"));
assertNotNull(outGroups);
assertTrue("findGroups result set wrong size", outGroups.size() == inGroups.size());
for (Group inGroupAnt : inGroups) {
Group inGroup = inGroupAnt;
int index = outGroups.indexOf(inGroup);
assertTrue("findGroups input data error ", index != -1);
Group outGroup = outGroups.get(index);
assertNotNull(outGroup);
assertEqual(inGroup, outGroup);
}
} catch (SecurityException ex) {
LOG.error("findGroups caught SecurityException=" + ex.getMessage(), ex);
fail(ex.getMessage());
}
}
use of org.apache.directory.fortress.core.GroupMgr in project directory-fortress-core by apache.
the class GroupAntTest method readGroups.
private void readGroups(String msg, List<Group> groups) {
LogUtil.logIt(msg);
try {
GroupMgr groupMgr = GroupMgrFactory.createInstance();
for (Group inGroup : groups) {
Group outGroup = groupMgr.read(inGroup);
assertNotNull(outGroup);
assertEqual(inGroup, outGroup);
}
} catch (SecurityException ex) {
LOG.error("readGroups caught SecurityException=" + ex.getMessage(), ex);
fail(ex.getMessage());
}
}
Aggregations