Examples of EntryChange


Examples of org.apache.directory.shared.ldap.model.message.controls.EntryChange

            } );
        bb.flip();

        EntryChangeDecorator decorator = new EntryChangeDecorator( codec );

        EntryChange entryChange = ( EntryChange ) decorator.decode( bb.array() );

        assertEquals( ChangeType.ADD, entryChange.getChangeType() );
        assertNull( entryChange.getPreviousDn() );
        assertEquals( EntryChangeDecorator.UNDEFINED_CHANGE_NUMBER, entryChange.getChangeNumber() );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.controls.EntryChange

        String expected = Strings.dumpBytes( bb.array() );
        bb.flip();

        EntryChangeDecorator decorator = new EntryChangeDecorator( codec );

        EntryChange entryChange = ( EntryChange ) decorator.getDecorated();
        entryChange.setChangeType( ChangeType.MODDN );
        entryChange.setChangeNumber( 16 );
        entryChange.setPreviousDn( new Dn( "a=b" ) );
        bb = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
        String decoded = Strings.dumpBytes( bb.array() );
        assertEquals( expected, decoded );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.controls.EntryChange

        String expected = Strings.dumpBytes( bb.array() );
        bb.flip();

        EntryChangeDecorator decorator = new EntryChangeDecorator( codec );

        EntryChange entryChange = ( EntryChange ) decorator.getDecorated();

        entryChange.setChangeType( ChangeType.MODDN );
        entryChange.setChangeNumber( 5124095576030430L );
        entryChange.setPreviousDn( new Dn( "a=b" ) );
        bb = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
        String decoded = Strings.dumpBytes( bb.array() );
        assertEquals( expected, decoded );
    }
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.