Home / Function/ testLineProtocol() — netty Function Reference

testLineProtocol() — netty Function Reference

Architecture documentation for the testLineProtocol() function in ReplayingDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  276fd093_734c_d029_1800_b566c5e1a91f["testLineProtocol()"]
  342ea63b_1bca_5900_7b37_0cc8ddc3402d["ReplayingDecoderTest"]
  276fd093_734c_d029_1800_b566c5e1a91f -->|defined in| 342ea63b_1bca_5900_7b37_0cc8ddc3402d
  cb764356_39c7_bd8e_9532_ace3c3e0ff88["LineDecoder()"]
  276fd093_734c_d029_1800_b566c5e1a91f -->|calls| cb764356_39c7_bd8e_9532_ace3c3e0ff88
  style 276fd093_734c_d029_1800_b566c5e1a91f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java lines 39–65

    @Test
    public void testLineProtocol() {
        EmbeddedChannel ch = new EmbeddedChannel(new LineDecoder());

        // Ordinary input
        ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 'A' }));
        assertNull(ch.readInbound());
        ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 'B' }));
        assertNull(ch.readInbound());
        ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 'C' }));
        assertNull(ch.readInbound());
        ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { '\n' }));

        ByteBuf buf = Unpooled.wrappedBuffer(new byte[] { 'A', 'B', 'C' });
        ByteBuf buf2 = ch.readInbound();
        assertEquals(buf, buf2);

        buf.release();
        buf2.release();

        // Truncated input
        ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 'A' }));
        assertNull(ch.readInbound());

        ch.finish();
        assertNull(ch.readInbound());
    }

Domain

Subdomains

Frequently Asked Questions

What does testLineProtocol() do?
testLineProtocol() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java.
Where is testLineProtocol() defined?
testLineProtocol() is defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java at line 39.
What does testLineProtocol() call?
testLineProtocol() calls 1 function(s): LineDecoder.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free