Package javax.naming.ldap

Examples of javax.naming.ldap.Rdn


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


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

     * </p>
     */
    public void testAddIntRdn001() throws Exception {
        try {
            LdapName ln = new LdapName("t=test");
            Rdn toadd = new Rdn("cn=common");
            ln.add(-1, toadd);
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}

    }
View Full Code Here

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

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

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

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

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

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

     * The expected result is the Rdn being inserted in the correct position.
     * </p>
     */
    public void testAddIntRdn008() throws Exception {
        LdapName ln = new LdapName("t=test");
        Rdn toadd = new Rdn("");
        assertEquals(",t=test", ln.add(1, toadd).toString());
    }
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.