Package org.apache.directory.shared.ldap.extras.controls

Examples of org.apache.directory.shared.ldap.extras.controls.SyncInfoValue


                0x01,
                ( byte ) 0x00 //         refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDone() );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncInfoValueDecorator ) syncInfoValue ).encode( ByteBuffer
View Full Code Here


                'b',
                'c' //         cookie       syncCookie OPTIONAL,
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncInfoValueDecorator ) syncInfoValue ).encode( ByteBuffer
View Full Code Here

                0x01,
                0x00 //        refreshDone  BOOLEAN DEFAULT TRUE
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDone() );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncInfoValueDecorator ) syncInfoValue ).encode( ByteBuffer
View Full Code Here

            {
                ( byte ) 0xA2, 0x00 // syncInfoValue ::= CHOICE {
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertTrue( syncInfoValue.isRefreshDone() );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncInfoValueDecorator ) syncInfoValue ).encode( ByteBuffer
View Full Code Here

                ( byte ) 0xA3, 0x00, // syncInfoValue ::= CHOICE {
                                     //     syncIdSet [3] SEQUENCE {
            } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        try
        {
            ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );
            fail( "Should not get there" );
View Full Code Here

                'b',
                'c', //         cookie       syncCookie OPTIONAL,
            } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        try
        {
            ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );
            fail( "Should not get there" );
View Full Code Here

                0x01,
                0x00, //         refreshDeletes BOOLEAN DEFAULT FALSE,
            } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        try
        {
            ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );
            fail( "Should not get there" );
View Full Code Here

                0x01,
                0x00, //         refreshDeletes BOOLEAN DEFAULT FALSE,
            } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        try
        {
            ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );
            fail( "Should not get there" );
View Full Code Here

                0x31,
                0x00, //         syncUUIDs SET OF syncUUID
            } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDeletes() );
        assertEquals( 0, syncInfoValue.getSyncUUIDs().size() );

        // Check the encoding
        try
        {
            ByteBuffer encoded = ( ( SyncInfoValueDecorator ) syncInfoValue ).encode( ByteBuffer
View Full Code Here

                0x03,
                0x03
        } );
        bb.flip();

        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );

        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        SyncInfoValue syncInfoValue = ( SyncInfoValue ) ( ( SyncInfoValueDecorator ) decorator ).decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString( syncInfoValue.getCookie() ) );
        assertFalse( syncInfoValue.isRefreshDeletes() );
        assertEquals( 3, syncInfoValue.getSyncUUIDs().size() );

        for ( int i = 0; i < 3; i++ )
        {
            byte[] uuid = syncInfoValue.getSyncUUIDs().get( i );

            for ( int j = 0; j < 16; j++ )
            {
                assertEquals( i + 1, uuid[j] );
            }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.extras.controls.SyncInfoValue

Copyright © 2018 www.massapicom. 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.