Package javax.naming.ldap

Examples of javax.naming.ldap.Rdn


        assertEquals(t, rdn.toString());
    }

    public void testToString011() throws Exception {
        String t = "a=";
        Rdn rdn = new Rdn("a=");
        assertEquals(t, rdn.toString());
    }
View Full Code Here


     * <p>
     * The expected result is an exception.
     * </p>
     */
    public void testGetValue001() throws Exception {
        Rdn rdn = new Rdn("");
        try {
            rdn.getValue();
            fail("Should throw an exception.");
        } catch (IndexOutOfBoundsException e) {}
    }
View Full Code Here

     * case it should return an Object that is not null when a non-empty name is
     * used.
     * </p>
     */
    public void testGetValue002() throws Exception {
        assertEquals("test", new Rdn("t=test").getValue());

        //multivalue object
        assertEquals("test", new Rdn("t=this+d=test").getValue());

        //value is quoted so the result must be in ascii
        assertEquals("LL", new Rdn("t=\\4C\\4C").getValue());

        //multivalue object is created and value is quoted so the result must be in ascii
        assertEquals("test", new Rdn("t=\\4C\\4C+d=test+f=asd").getValue());

        //multivalue object is created and value is quoted so the result must be in ascii
        assertEquals("", new Rdn("t=\\4C\\4C+d=+f=asd").getValue());
    }
View Full Code Here

     * </p>
     */
    public void testGetValue014() throws Exception {
        //object is created with a primitive
        int b = 8;
        assertEquals(b, new Rdn("t", b).getValue());

        Object data = new Object();
        assertSame(data, new Rdn("t", data).getValue());

        BasicAttributes x = new BasicAttributes("t", null);
        assertNull(new Rdn(x).getValue());
    }
View Full Code Here

     * <p>
     * The expected result is an exception.
     * </p>
     */
    public void testGetType001() throws Exception {
        Rdn x = new Rdn("");
        try {
            x.getType();
            fail("IndexOutOfBoundsException expected");
        } catch (IndexOutOfBoundsException e) {}
    }
View Full Code Here

     * <p>
     * The expected result is a non-null and non-empty String.
     * </p>
     */
    public void testGetType002() throws Exception {
        Rdn x = new Rdn("t=test");
        assertEquals("t", x.getType());
    }
View Full Code Here

     * <p>
     * The expected result is a non-null and non-empty String.
     * </p>
     */
    public void testGetType003() throws Exception {
        Rdn x = new Rdn("t=test+t2=this");
        assertEquals("t", x.getType());
    }
View Full Code Here

     * <p>
     * The expected result is a non-null and non-empty String.
     * </p>
     */
    public void testGetType004() throws Exception {
        Rdn x = new Rdn("t2=test+t=this");
        assertEquals("t", x.getType());
    }
View Full Code Here

     * <p>
     * The expected result is a non-null and not empty String.
     * </p>
     */
    public void testGetType005() throws Exception {
        Rdn x = new Rdn("t=test+d=this+a=asd");
        assertEquals("a", x.getType());
    }
View Full Code Here

     * <p>
     * The expected result is zero.
     * </p>
     */
    public void testCompareTo001() throws Exception {
        Rdn rdn1 = new Rdn("");
        Rdn rdn2 = new Rdn("");
        assertEquals(0, rdn1.compareTo(rdn2));
    }
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.