Search in sources :

Example 1 with SignatureCalculator

use of com.ning.http.client.SignatureCalculator in project riposte by Nike-Inc.

the class AsyncHttpClientHelperTest method beforeMethod.

@Before
public void beforeMethod() {
    helperSpy = spy(new AsyncHttpClientHelper());
    channelMock = mock(Channel.class);
    ctxMock = mock(ChannelHandlerContext.class);
    stateAttributeMock = mock(Attribute.class);
    state = new HttpProcessingState();
    eventLoopMock = mock(EventLoop.class);
    signatureCalculator = mock(SignatureCalculator.class);
    doReturn(channelMock).when(ctxMock).channel();
    doReturn(stateAttributeMock).when(channelMock).attr(ChannelAttributes.HTTP_PROCESSING_STATE_ATTRIBUTE_KEY);
    doReturn(state).when(stateAttributeMock).get();
    doReturn(eventLoopMock).when(channelMock).eventLoop();
    handlerWithTracingAndMdcDummyExample = new AsyncCompletionHandlerWithTracingAndMdcSupport<>(null, null, false, null, null, null, null, null);
    resetTracingAndMdc();
}
Also used : EventLoop(io.netty.channel.EventLoop) SignatureCalculator(com.ning.http.client.SignatureCalculator) Attribute(io.netty.util.Attribute) Channel(io.netty.channel.Channel) HttpProcessingState(com.nike.riposte.server.http.HttpProcessingState) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) Before(org.junit.Before)

Aggregations

HttpProcessingState (com.nike.riposte.server.http.HttpProcessingState)1 SignatureCalculator (com.ning.http.client.SignatureCalculator)1 Channel (io.netty.channel.Channel)1 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)1 EventLoop (io.netty.channel.EventLoop)1 Attribute (io.netty.util.Attribute)1 Before (org.junit.Before)1