testDecoder() — netty Function Reference
Architecture documentation for the testDecoder() function in CodecProtobufTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c82a2fbf_3cd0_924e_853c_034dd37ef23b["testDecoder()"] de3e0e0c_8b7c_b0c5_a050_5385ab1422d3["CodecProtobufTest"] c82a2fbf_3cd0_924e_853c_034dd37ef23b -->|defined in| de3e0e0c_8b7c_b0c5_a050_5385ab1422d3 style c82a2fbf_3cd0_924e_853c_034dd37ef23b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecProtobufTest.java lines 30–45
@Test
public void testDecoder() {
EmbeddedChannel ch = new EmbeddedChannel(new ProtobufVarint32FrameDecoder());
byte[] b = { 4, 1, 1, 1, 1 };
assertFalse(ch.writeInbound(wrappedBuffer(b, 0, 1)));
assertNull(ch.readInbound());
assertFalse(ch.writeInbound(wrappedBuffer(b, 1, 2)));
assertNull(ch.readInbound());
assertTrue(ch.writeInbound(wrappedBuffer(b, 3, b.length - 3)));
ByteBuf expected = wrappedBuffer(new byte[] { 1, 1, 1, 1 });
ByteBuf actual = ch.readInbound();
assertEquals(expected, actual);
assertFalse(ch.finish());
expected.release();
actual.release();
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testDecoder() do?
testDecoder() is a function in the netty codebase, defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecProtobufTest.java.
Where is testDecoder() defined?
testDecoder() is defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecProtobufTest.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free