Package javax.naming.ldap

Examples of javax.naming.ldap.Rdn


     * The expected result is if a non null list of Rdns is sended, is a true.
     * </p>
     */
    public void testEndsWithListOfRdn007() throws Exception {
        LinkedList<Rdn> test = new LinkedList<Rdn>();
        test.add(new Rdn("t3=test3"));
        assertTrue(new LdapName("t3=test3,t2=test2,t=test").endsWith(test));
    }
View Full Code Here


     * The expected result is the adding in the especified order.
     * </p>
     */
    public void testAddAllListOfRdn004() throws Exception {
        LinkedList<Rdn> test = new LinkedList<Rdn>();
        test.add(new Rdn("t=test"));
        LdapName ln = new LdapName("");
        ln.addAll(test);
        assertEquals("t=test", ln.toString());
    }
View Full Code Here

     * The expected result is the adding in the especified order.
     * </p>
     */
    public void testAddAllListOfRdn005() throws Exception {
        LinkedList<Rdn> test = new LinkedList<Rdn>();
        test.add(new Rdn("t=test"));
        test.add(new Rdn("t2=test"));
        LdapName ln = new LdapName("t3=test");
        ln.addAll(test);
        assertEquals("t2=test,t=test,t3=test", ln.toString());
    }
View Full Code Here

     * </p>
     */
    public void testAddAllIntListOfRdn002() throws Exception {
        LinkedList<Rdn> test = new LinkedList<Rdn>();
        try {
            test.add(new Rdn("t=test"));
            test.add(new Rdn("cn=common"));
            LdapName ln = new LdapName("t=test");
            ln.addAll(-1, test);
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}
    }
View Full Code Here

     */
    public void testAddAllIntListOfRdn003() throws Exception {

        LinkedList<Rdn> test = new LinkedList<Rdn>();
        try {
            test.add(new Rdn("t=test"));
            test.add(new Rdn("cn=common"));
            LdapName ln = new LdapName("t=test");
            ln.addAll(2, test);
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}
    }
View Full Code Here

     * The expected result is the Rdns added in the correct order.
     * </p>
     */
    public void testAddAllIntListOfRdn005() throws Exception {
        LinkedList<Rdn> test = new LinkedList<Rdn>();
        test.add(new Rdn("t=test"));
        LdapName ln = new LdapName("");
        ln.addAll(0, test);
        assertEquals("t=test", ln.toString());
    }
View Full Code Here

     * The expected result is the name added to the end of the LdapName.
     * </p>
     */
    public void testAddString007() throws Exception {
        LinkedList ll = new LinkedList();
        ll.add(new Rdn("t=test"));
        LdapName ln = new LdapName(ll);
        ln.add("t1=test1");
        ll.remove(0);
        assertEquals(2, ln.size());
    }
View Full Code Here

     * The expected result is the Rdn being inserted in the correct position.
     * </p>
     */
    public void testAddRdn001() throws Exception {
        LdapName ln = new LdapName("t=test");
        Rdn toadd = new Rdn("cn=common");
        assertNotNull(ln.add(toadd));
    }
View Full Code Here

     * The expected result is the Rdn being inserted in the correct position.
     * </p>
     */
    public void testAddRdn002() throws Exception {
        LdapName ln = new LdapName("t=test");
        Rdn toadd = new Rdn("cn=common");
        assertEquals("cn=common,t=test", ln.add(toadd).toString());
    }
View Full Code Here

     * </p>
     */
    public void testAddRdn003() throws Exception {
        try {
            LdapName ln = new LdapName("t=test");
            Rdn toadd = null;
            ln.add(toadd);
            fail("NPE expected");
        } catch (NullPointerException e) {}
    }
View Full Code Here

TOP

Related Classes of javax.naming.ldap.Rdn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.