Package org.apache.directory.api.ldap.model.name

Examples of org.apache.directory.api.ldap.model.name.Ava


        referenceRdn = new Rdn( "ou=system" );
        referenceRdn.apply( schemaManager );
        sharedRdn = new Rdn( "ou=system" );
        sharedRdn.apply( schemaManager );

        referenceAva = new Ava( schemaManager, "ou", "System" );
        sharedAva = new Ava( schemaManager, "ou", "System" );
    }
View Full Code Here


     * Test a null AttributeTypeAndValue
     */
    @Test
    public void testAttributeTypeAndValueNull()
    {
        Ava atav = new Ava( schemaManager );
        assertEquals( "", atav.toString() );
        assertEquals( "", atav.getName() );
    }
View Full Code Here

     * Test a null AttributeTypeAndValue
     */
    @Test
    public void testAttributeTypeAndValueNull()
    {
        Ava atav = new Ava();
        assertEquals( "", atav.toString() );
        assertEquals( "", atav.getName() );
    }
View Full Code Here

    @Test
    public void testAttributeTypeAndValueNullType() throws LdapException
    {
        try
        {
            new Ava( schemaManager, null, ( String ) null );
            fail();
        }
        catch ( LdapException ine )
        {
            assertTrue( true );
View Full Code Here

    @Test
    public void testAttributeTypeAndValueInvalidType() throws LdapException
    {
        try
        {
            new Ava( schemaManager, "  ", ( String ) null );
            fail();
        }
        catch ( LdapException ine )
        {
            assertTrue( true );
View Full Code Here

     * Test a valid type for an AttributeTypeAndValue
     */
    @Test
    public void testAttributeTypeAndValueValidType() throws LdapException
    {
        Ava atav = new Ava( schemaManager, "A", ( String ) null );
        assertEquals( "A=", atav.toString() );
        assertEquals( "a=", atav.getNormName() );
        assertEquals( "A=", atav.getName() );

        atav = new Ava( schemaManager, "  A  ", ( String ) null );
        assertEquals( "a=", atav.getNormName() );
        assertEquals( "  A  =", atav.toString() );
        assertEquals( "  A  =", atav.getName() );

        try
        {
            atav = new Ava( schemaManager, null, ( String ) null );
            fail();
        }
        catch ( LdapInvalidDnException lide )
        {
            assertTrue( true );
View Full Code Here

    @Test
    public void testLdapRDNEmpty()
    {
        try
        {
            new Ava( schemaManager, "", "" );
            fail( "Should not occurs ... " );
        }
        catch ( LdapException ine )
        {
            assertTrue( true );
View Full Code Here

     * test a simple AttributeTypeAndValue : a = b
     */
    @Test
    public void testLdapRDNSimple() throws LdapException
    {
        Ava atav = new Ava( schemaManager, "a", "b" );
        assertEquals( "a=b", atav.toString() );
        assertEquals( "a=b", atav.getName() );
    }
View Full Code Here

     * Compares two equals atavs
     */
    @Test
    public void testEqualsAttributeEquals() throws LdapException
    {
        Ava atav1 = new Ava( schemaManager, "a", "b" );
        Ava atav2 = new Ava( schemaManager, "a", "b" );

        assertTrue( atav1.equals( atav2 ) );
    }
View Full Code Here

     * Compares two equals atavs but with a type in different case
     */
    @Test
    public void testEqualsAttributeIdSameCase() throws LdapException
    {
        Ava atav1 = new Ava( schemaManager, "a", "b" );
        Ava atav2 = new Ava( schemaManager, "A", "b" );

        assertTrue( atav1.equals( atav2 ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.name.Ava

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.