Package javax.naming.ldap

Examples of javax.naming.ldap.LdapName.addAll()


     * </p>
     */
    public void testAddAllIntName001() throws Exception {
        try {
            LdapName ln = new LdapName("t=test");
            ln.addAll(2, new LdapName("uid=userid"));
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}
    }

    /**
 
View Full Code Here


     * </p>
     */
    public void testAddAllIntName002() throws Exception {
        try {
            LdapName ln = new LdapName("t=test");
            ln.addAll(-1, new LdapName("uid=userid"));
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}
    }

    /**
 
View Full Code Here

     * The expected result is the adding of the name in the especified order.
     * </p>
     */
    public void testAddAllIntName003() throws Exception {
        LdapName ln = new LdapName("t=test");
        ln.addAll(1, new LdapName("uid=userid"));
        assertEquals("uid=userid,t=test", ln.toString());
    }

    /**
     * <p>
 
View Full Code Here

     * The expected result is the adding of the name in the specified order.
     * </p>
     */
    public void testAddAllIntName005() throws Exception {
        LdapName ln = new LdapName("t=test");
        ln.addAll(0, new LdapName("uid=userid"));
        assertEquals("t=test,uid=userid", ln.toString());
    }

    /**
     * <p>
 
View Full Code Here

     */
    public void testAddAllIntListOfRdn001() throws Exception {
        LinkedList<Rdn> test = null;
        try {
            LdapName ln = new LdapName("t=test");
            ln.addAll(0, test);
            fail("NPE expected");
        } catch (NullPointerException e) {}
    }

    /**
 
View Full Code Here

        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

        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

     * </p>
     */
    public void testAddAllIntListOfRdn004() throws Exception {
        LinkedList<Rdn> test = new LinkedList<Rdn>();
        LdapName ln = new LdapName("");
        ln.addAll(0, test);
        assertEquals("", ln.toString());
    }

    /**
     * <p>
 
View Full Code Here

     */
    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());
    }

    /**
     * <p>
 
View Full Code Here

     * </p>
     */
    public void testAddAllIntListOfRdn006() throws Exception {
        LinkedList<Rdn> test = new LinkedList<Rdn>();
        LdapName ln = new LdapName("t=test");
        ln.addAll(0, test);
        assertEquals("t=test", ln.toString());
    }

    /**
     * <p>
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.