testReplacement() — netty Function Reference
Architecture documentation for the testReplacement() function in ReplayingDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b1dbb212_adb4_7f2d_fe52_c7c7eddaebf0["testReplacement()"] 342ea63b_1bca_5900_7b37_0cc8ddc3402d["ReplayingDecoderTest"] b1dbb212_adb4_7f2d_fe52_c7c7eddaebf0 -->|defined in| 342ea63b_1bca_5900_7b37_0cc8ddc3402d style b1dbb212_adb4_7f2d_fe52_c7c7eddaebf0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java lines 80–100
@Test
public void testReplacement() throws Exception {
EmbeddedChannel ch = new EmbeddedChannel(new BloatedLineDecoder());
// "AB" should be forwarded to LineDecoder by BloatedLineDecoder.
ch.writeInbound(Unpooled.wrappedBuffer(new byte[]{'A', 'B'}));
assertNull(ch.readInbound());
// "C\n" should be appended to "AB" so that LineDecoder decodes it correctly.
ch.writeInbound(Unpooled.wrappedBuffer(new byte[]{'C', '\n'}));
ByteBuf buf = Unpooled.wrappedBuffer(new byte[] { 'A', 'B', 'C' });
ByteBuf buf2 = ch.readInbound();
assertEquals(buf, buf2);
buf.release();
buf2.release();
ch.finish();
assertNull(ch.readInbound());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testReplacement() do?
testReplacement() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java.
Where is testReplacement() defined?
testReplacement() is defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java at line 80.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free