Package org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect

Examples of org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectDecoder


     * Test the decoding of a GracefulDisconnect with an empty TimeOffline
     */
    @Test
    public void testDecodeGracefulDisconnectTimeOfflineEmpty()
    {
        Asn1Decoder decoder = new GracefulDisconnectDecoder();
        ByteBuffer bb = ByteBuffer.allocate( 0x0b );
        bb.put( new byte[]
            { 0x30, 0x02, // GracefulDisconnect ::= SEQUENCE {
                0x02,
                0x00 // timeOffline INTEGER (0..720) DEFAULT 0,
        } );
        bb.flip();

        GracefulDisconnectContainer container = new GracefulDisconnectContainer();

        try
        {
            decoder.decode( bb, container );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
            return;
View Full Code Here


     * Test the decoding of a GracefulDisconnect with an empty delay
     */
    @Test
    public void testDecodeGracefulDisconnectDelayEmpty()
    {
        Asn1Decoder decoder = new GracefulDisconnectDecoder();
        ByteBuffer bb = ByteBuffer.allocate( 0x0b );
        bb.put( new byte[]
            { 0x30, 0x02, // GracefulDisconnect ::= SEQUENCE {
                ( byte ) 0x80,
                0x00 // delay INTEGER (0..86400) DEFAULT 0
        } );
        bb.flip();

        GracefulDisconnectContainer container = new GracefulDisconnectContainer();

        try
        {
            decoder.decode( bb, container );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
            return;
View Full Code Here

     * contexts
     */
    @Test
    public void testDecodeGracefulDisconnectReplicatedContextsEmpty()
    {
        Asn1Decoder decoder = new GracefulDisconnectDecoder();
        ByteBuffer bb = ByteBuffer.allocate( 0x04 );
        bb.put( new byte[]
            { 0x30, 0x02, // GracefulDisconnect ::= SEQUENCE {
                0x30,
                0x00 // replicatedContexts Referral OPTIONAL
        } );
        bb.flip();

        GracefulDisconnectContainer container = new GracefulDisconnectContainer();

        try
        {
            decoder.decode( bb, container );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
            return;
View Full Code Here

     * context
     */
    @Test
    public void testDecodeGracefulDisconnectReplicatedContextsInvalid()
    {
        Asn1Decoder decoder = new GracefulDisconnectDecoder();
        ByteBuffer bb = ByteBuffer.allocate( 0x06 );
        bb.put( new byte[]
            { 0x30, 0x04, // GracefulDisconnect ::= SEQUENCE {
                0x30,
                0x02, // replicatedContexts Referral OPTIONAL
                0x04,
                0x00 } );
        bb.flip();

        GracefulDisconnectContainer container = new GracefulDisconnectContainer();

        try
        {
            decoder.decode( bb, container );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
            return;
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectDecoder

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.