Exemplo n.º 1
0
 @BeforeClass
 public static void setUpClass() throws Exception {
   HELPER = Utils.getHelper();
   CN = "G_" + System.currentTimeMillis();
   testUser1 = HELPER.getUserTemplate("U_" + System.currentTimeMillis());
   testUser1.set("cn", testUser1.getUid());
   HELPER.setUser(testUser1);
 }
Exemplo n.º 2
0
 @Test
 public void testAddUsersToGroup() throws Exception {
   testUser2 = HELPER.getUserTemplate("U_" + System.currentTimeMillis());
   testUser2.set("cn", testUser2.getUid());
   HELPER.setUser(testUser2);
   LdapGroup g1 = Utils.createTestGroup(CN);
   g1.addUser(testUser1);
   g1.addUser(testUser2);
   HELPER.setGroup(g1);
   g1 = (LdapGroup) HELPER.getGroup(CN);
   LOG.log(Level.INFO, "user count Group {0} is {1}", new Object[] {CN, g1.getUsers().size()});
   assertTrue(g1.getUsers().size() > 2);
   Utils.removeTestGroup(g1);
 }