setup() — netty Function Reference
Architecture documentation for the setup() function in Http2FrameRoundtripTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a7462a66_0006_7ca6_d51d_c99d38165b7b["setup()"] 900e14d5_99d5_0a22_aeb4_72af4ffe3fca["Http2FrameRoundtripTest"] a7462a66_0006_7ca6_d51d_c99d38165b7b -->|defined in| 900e14d5_99d5_0a22_aeb4_72af4ffe3fca style a7462a66_0006_7ca6_d51d_c99d38165b7b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameRoundtripTest.java lines 94–122
@BeforeEach
public void setup() throws Exception {
MockitoAnnotations.initMocks(this);
when(ctx.alloc()).thenReturn(alloc);
when(ctx.executor()).thenReturn(executor);
when(ctx.channel()).thenReturn(channel);
doAnswer(new Answer<ByteBuf>() {
@Override
public ByteBuf answer(InvocationOnMock in) throws Throwable {
return Unpooled.buffer();
}
}).when(alloc).buffer();
doAnswer(new Answer<ByteBuf>() {
@Override
public ByteBuf answer(InvocationOnMock in) throws Throwable {
return Unpooled.buffer((Integer) in.getArguments()[0]);
}
}).when(alloc).buffer(anyInt());
doAnswer(new Answer<ChannelPromise>() {
@Override
public ChannelPromise answer(InvocationOnMock invocation) throws Throwable {
return new DefaultChannelPromise(channel, GlobalEventExecutor.INSTANCE);
}
}).when(ctx).newPromise();
writer = new DefaultHttp2FrameWriter(new DefaultHttp2HeadersEncoder(NEVER_SENSITIVE, newTestEncoder()));
reader = new DefaultHttp2FrameReader(new DefaultHttp2HeadersDecoder(false, false, newTestDecoder()));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does setup() do?
setup() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameRoundtripTest.java.
Where is setup() defined?
setup() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameRoundtripTest.java at line 94.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free