Package org.apache.directory.shared.ldap.codec.abandon

Examples of org.apache.directory.shared.ldap.codec.abandon.AbandonRequest


        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
        Control control = abandonRequest.getCurrentControl();
       
        assertEquals( 1, abandonRequest.getControls().size() );
        assertTrue( control.getCriticality() );
        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
        assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
    }
View Full Code Here


        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
        Control control = abandonRequest.getCurrentControl();
       
        assertEquals( 1, abandonRequest.getControls().size() );
        assertTrue( control.getCriticality() );
        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
        assertEquals( "DSMLv2.0 rocks!!", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
    }
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
        Control control = abandonRequest.getCurrentControl();
       
        assertEquals( 1, abandonRequest.getControls().size() );
        assertTrue( control.getCriticality() );
        assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
        assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
    }
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
        Control control = abandonRequest.getCurrentControl();
       
        assertEquals( 2, abandonRequest.getControls().size() );
        assertFalse( control.getCriticality() );
        assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
        assertEquals( "Some other text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
    }
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
        Control control = abandonRequest.getCurrentControl();
       
        assertEquals( 3, abandonRequest.getControls().size() );
        assertTrue( control.getCriticality() );
        assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
        assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
    }
View Full Code Here

     */
    public Element toDsml( Element root )
    {
        Element element = super.toDsml( root );
       
        AbandonRequest request = ( AbandonRequest ) instance;
       
        // AbandonID
        if ( request.getAbandonedMessageId() != 0 )
        {
            element.addAttribute( "abandonID", "" + request.getAbandonedMessageId() );
        }
       
        return element;
    }
View Full Code Here

    /**
     * Creates a new instance of AbandonRequestDsml.
     */
    public AbandonRequestDsml()
    {
        super( new AbandonRequest() );
    }
View Full Code Here

     */
    public Element toDsml( Element root )
    {
        Element element = super.toDsml( root );

        AbandonRequest request = ( AbandonRequest ) instance;

        // AbandonID
        if ( request.getAbandonedMessageId() != 0 )
        {
            element.addAttribute( "abandonID", "" + request.getAbandonedMessageId() );
        }

        return element;
    }
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();

        assertEquals( 123, abandonRequest.getAbandonedMessageId() );
    }
View Full Code Here

        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();

        assertEquals( 456, abandonRequest.getMessageId() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.codec.abandon.AbandonRequest

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.