ConsolidationTest Class — netty Architecture
Architecture documentation for the ConsolidationTest class in ConsolidationTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d0e72a7a_1993_09a5_23e8_111048899c97["ConsolidationTest"] 10653f7a_b8d8_2478_5609_1b207e4b9368["ConsolidationTest.java"] d0e72a7a_1993_09a5_23e8_111048899c97 -->|defined in| 10653f7a_b8d8_2478_5609_1b207e4b9368 570327a5_9f1c_98cd_483c_7aa43c842428["shouldWrapInSequence()"] d0e72a7a_1993_09a5_23e8_111048899c97 -->|method| 570327a5_9f1c_98cd_483c_7aa43c842428 10a72185_e7eb_4aea_41c1_19ba68465c06["shouldConsolidationInSequence()"] d0e72a7a_1993_09a5_23e8_111048899c97 -->|method| 10a72185_e7eb_4aea_41c1_19ba68465c06
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/ConsolidationTest.java lines 27–77
public class ConsolidationTest {
@Test
public void shouldWrapInSequence() {
ByteBuf currentBuffer = wrappedBuffer(wrappedBuffer("a".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("=".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("1".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("&".getBytes(CharsetUtil.US_ASCII)));
ByteBuf copy = currentBuffer.copy();
String s = copy.toString(CharsetUtil.US_ASCII);
assertEquals("a=1&", s);
currentBuffer.release();
copy.release();
}
@Test
public void shouldConsolidationInSequence() {
ByteBuf currentBuffer = wrappedBuffer(wrappedBuffer("a".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("=".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("1".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("&".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("b".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("=".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("2".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("&".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("c".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("=".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("3".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("&".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("d".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("=".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("4".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("&".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("e".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("=".getBytes(CharsetUtil.US_ASCII)));
currentBuffer = wrappedBuffer(currentBuffer, wrappedBuffer("5".getBytes(CharsetUtil.US_ASCII)),
wrappedBuffer("&".getBytes(CharsetUtil.US_ASCII)));
ByteBuf copy = currentBuffer.copy();
String s = copy.toString(CharsetUtil.US_ASCII);
assertEquals("a=1&b=2&c=3&d=4&e=5&", s);
currentBuffer.release();
copy.release();
}
}
Source
Frequently Asked Questions
What is the ConsolidationTest class?
ConsolidationTest is a class in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/ConsolidationTest.java.
Where is ConsolidationTest defined?
ConsolidationTest is defined in buffer/src/test/java/io/netty/buffer/ConsolidationTest.java at line 27.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free