Package javax.naming.ldap

Examples of javax.naming.ldap.LdapName


     * blank.
     * </p>
     */
    public void testGetPrefix006() throws Exception {
        String test = "";
        LdapName ln = new LdapName(test);
        assertEquals(test, ln.getPrefix(ln.size()).toString());
    }
View Full Code Here


     * The expected result is a not null name.
     * </p>
     */
    public void testGetSuffix001() throws Exception {
        String test = "t=test";
        LdapName ln = new LdapName(test);
        assertNotNull(ln.getSuffix(0));
        assertEquals("t=test", ln.getSuffix(0).toString());
    }
View Full Code Here

     * The expected result is a not null name but empty.
     * </p>
     */
    public void testGetSuffix002() throws Exception {
        String test = "t=test";
        LdapName ln = new LdapName(test);
        assertTrue(ln.getSuffix(1).isEmpty());
    }
View Full Code Here

     * The expected result is the suffix with the correct index.
     * </p>
     */
    public void testGetSuffix003() throws Exception {
        String test = "t1=test,t2=test,t3=test";
        LdapName ln = new LdapName(test);
        assertEquals("t1=test,t2=test", ln.getSuffix(1).toString());
    }
View Full Code Here

     * </p>
     */
    public void testGetSuffix004() throws Exception {
        String test = "t=test";
        try {
            LdapName ln = new LdapName(test);
            ln.getSuffix(-1);
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}
    }
View Full Code Here

     * The expected result is an exception like IndexOutOfBounds.
     * </p>
     */
    public void testGetSuffix005() throws Exception {
        String test = "t=test";
        LdapName ln = new LdapName(test);
        try {
            ln.getSuffix(2);
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}
    }
View Full Code Here

     * The expected result is the complete suffix with the correct index.
     * </p>
     */
    public void testGetSuffix006() throws Exception {
        String test = "t1=test,t2=test,t3=test";
        LdapName ln = new LdapName(test);
        assertEquals(test, ln.getSuffix(0).toString());
    }
View Full Code Here

     * The expected result is the suffix with the correct index.
     * </p>
     */
    public void testGetSuffix007() throws Exception {
        String test = "t1=test,t2=test,t3=test";
        LdapName ln = new LdapName(test);
        assertEquals("t1=test", ln.getSuffix(2).toString());
    }
View Full Code Here

     * The expected result is a not null name but empty.
     * </p>
     */
    public void testGetSuffix008() throws Exception {
        String test = "";
        LdapName ln = new LdapName(test);
        assertNotNull(ln.getSuffix(0));
        assertTrue(ln.getSuffix(0).isEmpty());
    }
View Full Code Here

     * The expected result is a false.
     * </p>
     */
    public void testStartsWithName001() throws Exception {
        String test = "t=test";
        LdapName ln = new LdapName(test);
        LdapName t = null;
        assertFalse(ln.startsWith(t));
    }
View Full Code Here

TOP

Related Classes of javax.naming.ldap.LdapName

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.