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

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


        assertFalse( entry.remove( "badId", "test1" ) );

        entry.put( attrCN );
        assertTrue( entry.remove( "cn", (String)null ) );
        assertTrue( entry.remove( "commonName", "test1", "test2" ) );
        assertFalse( entry.containsAttribute( atCN ) );
       
        entry.add( atCN, "test1", (String)null, "test2" );
        assertTrue( entry.remove( "2.5.4.3", (String)null ) );
        assertEquals( 2, entry.get( atCN ).size() );
        assertFalse( entry.contains( atCN, (byte[])null ) );
View Full Code Here


        EntryAttribute attrPWD = new DefaultServerAttribute( atCN, "test1", (String)null, "test2" );

        entry.put( attrPWD );
        assertTrue( entry.remove( "CN", strNullValue ) );
        assertTrue( entry.remove( "CommonName", strValue1, strValue2 ) );
        assertFalse( entry.containsAttribute( atCN ) );
       
        entry.add( atCN, strValue1, strNullValue, strValue2 );
        assertTrue( entry.remove( "2.5.4.3", strNullValue ) );
        assertEquals( 2, entry.get( atCN ).size() );
        assertFalse( entry.contains( atCN, strNullValue ) );
View Full Code Here

        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
       
        // Test a simple addition
        entry.add( "CN", "test1" );
        assertNotNull( entry.get( atCN ) );
        assertTrue( entry.containsAttribute( atCN ) );
        assertEquals( "cn", entry.get( atCN ).getId() );
        assertEquals( "CN", entry.get( atCN ).getUpId() );
        assertEquals( 1, entry.get( atCN ).size() );
        assertEquals( "test1", entry.get( atCN ).get().getString() );
       
View Full Code Here

        // Test a simple addition in atCN
        entry.add( "cN", test1 );
        assertNotNull( entry.get( atCN ) );
        assertEquals( 1, entry.get( atCN ).size() );
        assertEquals( "test1", entry.get( atCN ).get().getString() );
        assertTrue( entry.containsAttribute( atCN ) );
        assertEquals( "cN", entry.get( atCN ).getUpId() );
       
        // Test some more addition
        entry.add( "cN", test2, test3 );
        assertNotNull( entry.get( atCN ) );
View Full Code Here

        assertNotNull( entry.get( atCN ) );
        assertEquals( 3, entry.get( atCN ).size() );
        assertTrue( entry.contains( atCN, "test1" ) );
        assertTrue( entry.contains( atCN, "test2" ) );
        assertTrue( entry.contains( atCN, "test3" ) );
        assertTrue( entry.containsAttribute( atCN ) );
        assertEquals( "cN", entry.get( atCN ).getUpId() );
       
        // Test some addition of existing values
        entry.add( "cN", test2 );
        assertNotNull( entry.get( atCN ) );
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.