Code example for Collection

Methods: containssize

0
 
        assertEquals(dn.getLength(), 4);
 
        RDN rdn = dn.getRdn(0);
        Collection names = rdn.getNames();
        assertEquals(names.size(), 3);
        assertTrue(names.contains("cn"));
        assertEquals(rdn.get("cn"), "James Bond");
        assertTrue(names.contains("uid"));
        assertEquals(rdn.get("uid"), "jbond");
        assertTrue(names.contains("displayName"));
        assertEquals(rdn.get("displayName"), "007");
 
        rdn = dn.getRdn(1);
        names = rdn.getNames();
        assertEquals(names.size(), 2);
        assertTrue(names.contains("ou"));
        assertEquals(rdn.get("ou"), "Users");
        assertTrue(names.contains("description"));
        assertEquals(rdn.get("description"), "Secret Agents");
Experience pair programming with AI  Get Codota for Java