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

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


        // 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

        // Test a simple addition
        entry.add( "userPASSWORD", 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", testB2, testB3 );
        assertNotNull( entry.get( atPassword ) );
View Full Code Here

        // Test a simple addition in atCN
        entry.add( "cN", atCN, 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", atCN, 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", atCN, test2 );
        assertNotNull( entry.get( atCN ) );
View Full Code Here

        // 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

    @Test
    public void testContainsAttributeAttributeType() throws Exception
    {
        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.containsAttribute( atOC ) );
       
        EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
        EntryAttribute attrSN = new DefaultServerAttribute( atSN, "Test1", "Test2" );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2 );
View Full Code Here

        EntryAttribute attrSN = new DefaultServerAttribute( atSN, "Test1", "Test2" );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2 );

        entry.add( attrOC, attrCN, attrSN, attrPWD );
       
        assertTrue( entry.containsAttribute( atOC ) );
        assertTrue( entry.containsAttribute( atCN ) );
        assertTrue( entry.containsAttribute( atSN ) );
        assertTrue( entry.containsAttribute( atPwd ) );
       
        entry.clear();
View Full Code Here

        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2 );

        entry.add( attrOC, attrCN, attrSN, attrPWD );
       
        assertTrue( entry.containsAttribute( atOC ) );
        assertTrue( entry.containsAttribute( atCN ) );
        assertTrue( entry.containsAttribute( atSN ) );
        assertTrue( entry.containsAttribute( atPwd ) );
       
        entry.clear();
View Full Code Here

        entry.add( attrOC, attrCN, attrSN, attrPWD );
       
        assertTrue( entry.containsAttribute( atOC ) );
        assertTrue( entry.containsAttribute( atCN ) );
        assertTrue( entry.containsAttribute( atSN ) );
        assertTrue( entry.containsAttribute( atPwd ) );
       
        entry.clear();

        assertFalse( entry.containsAttribute( atOC ) );
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.