Package org.apache.directory.shared.ldap.entry

Examples of org.apache.directory.shared.ldap.entry.DefaultServerEntry.containsAttribute()


        // Test a simple addition
        entry.add( "userPASSWORD", atPassword, testB1 );
        assertNotNull( entry.get( atPassword ) );
        assertEquals( 1, entry.get( atPassword ).size() );
        assertTrue( Arrays.equals( b1, entry.get( atPassword ).get().getBytes() ) );
        assertTrue( entry.containsAttribute( atPassword ) );
        assertEquals( "userPASSWORD", entry.get( atPassword ).getUpId() );
       
        // Test some more addition
        entry.add( "userPASSWORD", atPassword, testB2, testB3 );
        assertNotNull( entry.get( atPassword ) );
View Full Code Here


    public void testContainsStringByteArrayArray() throws Exception
    {
        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.contains( (String)null, BYTES3 ) );
        assertFalse( entry.containsAttribute( "objectClass" ) );
       
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, (byte[])null, BYTES2 );

        entry.add( attrPWD );
       
View Full Code Here

    public void testContainsStringStringArray() throws Exception
    {
        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.contains( (String)null, "test" ) );
        assertFalse( entry.containsAttribute( "objectClass" ) );
       
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", (String)null, "test2" );

        entry.add( attrCN );
       
View Full Code Here

    {
        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, atOC, atPwd, atCN );
        assertNotNull( entry );
        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 3, entry.size() );
        assertTrue( entry.containsAttribute( atOC ) );
        assertTrue( entry.containsAttribute( atPwd ) );
        assertTrue( entry.containsAttribute( atCN ) );
    }
   
   
View Full Code Here

        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, atOC, atPwd, atCN );
        assertNotNull( entry );
        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 3, entry.size() );
        assertTrue( entry.containsAttribute( atOC ) );
        assertTrue( entry.containsAttribute( atPwd ) );
        assertTrue( entry.containsAttribute( atCN ) );
    }
   
   
    /**
 
View Full Code Here

        assertNotNull( entry );
        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 3, entry.size() );
        assertTrue( entry.containsAttribute( atOC ) );
        assertTrue( entry.containsAttribute( atPwd ) );
        assertTrue( entry.containsAttribute( atCN ) );
    }
   
   
    /**
     * Test for method DefaultServerEntry( registries, DN, AttributeType, upId )
View Full Code Here

    {
        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, atOC, "  OBJECTCLASS  " );
        assertNotNull( entry );
        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atOC ) );
        assertEquals( "objectclass", entry.get( atOC ).getId() );
        assertEquals( "  OBJECTCLASS  ", entry.get( atOC ).getUpId() );
    }
   
   
View Full Code Here

    {
        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, "  OBJECTCLASS  ", " Cn " );
        assertNotNull( entry );
        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 2, entry.size() );
        assertTrue( entry.containsAttribute( "objectClass" ) );
        assertEquals( "objectclass", entry.get( atOC ).getId() );
        assertEquals( "  OBJECTCLASS  ", entry.get( atOC ).getUpId() );
        assertTrue( entry.containsAttribute( "2.5.4.3" ) );
        assertEquals( "cn", entry.get( atCN ).getId() );
        assertEquals( " Cn ", entry.get( atCN ).getUpId() );
View Full Code Here

        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 2, entry.size() );
        assertTrue( entry.containsAttribute( "objectClass" ) );
        assertEquals( "objectclass", entry.get( atOC ).getId() );
        assertEquals( "  OBJECTCLASS  ", entry.get( atOC ).getUpId() );
        assertTrue( entry.containsAttribute( "2.5.4.3" ) );
        assertEquals( "cn", entry.get( atCN ).getId() );
        assertEquals( " Cn ", entry.get( atCN ).getUpId() );
    }
   
   
View Full Code Here

        EntryAttribute c = new DefaultServerAttribute( atC, "FR", "US" );
       
        entry.add( oc, cn, sn, c );
       
        assertEquals( 4, entry.size() );
        assertTrue( entry.containsAttribute( "ObjectClass" ) );
        assertTrue( entry.containsAttribute( "CN" ) );
        assertTrue( entry.containsAttribute( "  sn  " ) );
        assertTrue( entry.containsAttribute( " countryName  " ) );
   
        EntryAttribute attr = entry.get( "objectclass" );
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.