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

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.clear()


        assertTrue( entry.contains( atPassword, b1 ) );
        assertTrue( entry.contains( atPassword, b2 ) );
        assertTrue( entry.contains( atPassword, b3 ) );
        assertTrue( entry.contains( atPassword, ( byte[] ) null ) );

        entry.clear();

        // Test the addition of a String value. It should be converted to a byte array
        byte[] b4 = Strings.getBytesUtf8( "test4" );

        entry.add( "userPASSWORD", atPassword, "test4" );
View Full Code Here


    {
        Entry entry = new DefaultEntry( schemaManager, EXAMPLE_DN );

        assertEquals( 0, entry.size() );
        assertNull( entry.get( "ObjectClass" ) );
        entry.clear();
        assertEquals( 0, entry.size() );
        assertNull( entry.get( "ObjectClass" ) );

        entry.add( "ObjectClass", "top", "person" );
        assertEquals( 1, entry.size() );
View Full Code Here

        entry.add( "ObjectClass", "top", "person" );
        assertEquals( 1, entry.size() );
        assertNotNull( entry.get( "ObjectClass" ) );

        entry.clear();
        assertEquals( 0, entry.size() );
        assertNull( entry.get( "ObjectClass" ) );
    }

View Full Code Here

        assertTrue( entry.contains( atPassword, b1 ) );
        assertTrue( entry.contains( atPassword, b2 ) );
        assertTrue( entry.contains( atPassword, b3 ) );
        assertTrue( entry.contains( atPassword, ( byte[] ) null ) );

        entry.clear();

        // Test the addition of a String value. It should be converted to a byte array
        byte[] b4 = Strings.getBytesUtf8( "test4" );

        entry.add( "userPASSWORD", "test4" );
View Full Code Here

        assertTrue( entry.contains( atEMail, "test1" ) );
        assertTrue( entry.contains( atEMail, "test2" ) );
        assertTrue( entry.contains( atEMail, "test3" ) );
        assertTrue( entry.contains( atEMail, ( String ) null ) );

        entry.clear();

        // Test the addition of a binary value
        byte[] test4 = Strings.getBytesUtf8( "test4" );

        entry.add( "email", atEMail, test4 );
View Full Code Here

        assertTrue( entry.contains( atPassword, test1 ) );
        assertTrue( entry.contains( atPassword, test2 ) );
        assertTrue( entry.contains( atPassword, test3 ) );
        assertTrue( entry.contains( atPassword, ( byte[] ) null ) );

        entry.clear();

        // Test the addition of a String value. It should be converted to a byte array
        byte[] test4 = Strings.getBytesUtf8( "test4" );

        entry.add( "userPassword", atPassword, "test4" );
View Full Code Here

        assertTrue( entry.containsAttribute( " email " ) );

        Attribute attrC = entry.get( "email" );
        assertEquals( 4, attrC.size() );

        entry.clear();
    }


    /**
     * Test for method add( String, byte[]...)
View Full Code Here

        Attribute attributePWD = entry.get( "userPassword" );
        assertEquals( 1, attributePWD.size() );
        assertNotNull( attributePWD.get() );
        assertNull( attributePWD.get().getValue() );

        entry.clear();

        entry.add( "userPassword", BYTES1, BYTES1, BYTES2 );
        assertEquals( 1, entry.size() );
        Attribute attributeJPG = entry.get( "userPassword" );
        assertEquals( 2, attributeJPG.size() );
View Full Code Here

        assertEquals( 2, attributeJPG.size() );
        assertNotNull( attributeJPG.get() );
        assertTrue( attributeJPG.contains( BYTES1 ) );
        assertTrue( attributeJPG.contains( BYTES2 ) );

        entry.clear();

        try
        {
            // Cannot add an attribute which does not exist
            entry.add( "wrongAT", BYTES1, BYTES2 );
View Full Code Here

        assertEquals( 1, attributeSN.size() );
        assertNotNull( attributeSN.get() );
        assertTrue( attributeSN.contains( "test" ) );
        assertTrue( attributeSN.contains( "TEST" ) );

        entry.clear();

        try
        {
            // Cannot add an attribute which does not exist
            entry.add( "wrongAT", "wrong", "wrong" );
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.