Package org.neo4j.smack.pipeline.http

Examples of org.neo4j.smack.pipeline.http.HttpDecoder$DecodedHttpMessage


    private void testDecoding(ChannelBuffer buf, RequestMatcher ... requestMatchers) throws Exception
    {
        DummyInputGate inputGate = new DummyInputGate();
       
        HttpDecoder decoder = new HttpDecoder(inputGate);
       
        MessageEvent msg = mock(MessageEvent.class);
        when(msg.getMessage()).thenReturn(buf);
       
        ChannelConfig channelConfig = mock(ChannelConfig.class);
        when(channelConfig.getBufferFactory()).thenReturn(new HeapChannelBufferFactory());
       
        Channel channel = mock(Channel.class);
        when(channel.getConfig()).thenReturn(channelConfig);
       
        ChannelHandlerContext ctx = mock(ChannelHandlerContext.class);
        when(ctx.getChannel()).thenReturn(channel);
       
        // Decode
       
        decoder.messageReceived(ctx, msg);
       
        // Check result
       
        assertThat("Should yield "+requestMatchers.length+" input requests", inputGate.requests.size(), is(requestMatchers.length));
       
View Full Code Here

TOP

Related Classes of org.neo4j.smack.pipeline.http.HttpDecoder$DecodedHttpMessage

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.