Home / Function/ testEmptySplitContent() — netty Function Reference

testEmptySplitContent() — netty Function Reference

Architecture documentation for the testEmptySplitContent() function in HttpContentEncoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  afc1557b_2b03_5da6_b162_63534b950d0d["testEmptySplitContent()"]
  992a26d3_2083_aeb8_4785_63c545814355["HttpContentEncoderTest"]
  afc1557b_2b03_5da6_b162_63534b950d0d -->|defined in| 992a26d3_2083_aeb8_4785_63c545814355
  0a866c5b_d089_2acd_5353_fc5ee08af6b5["assertEncodedResponse()"]
  afc1557b_2b03_5da6_b162_63534b950d0d -->|calls| 0a866c5b_d089_2acd_5353_fc5ee08af6b5
  style afc1557b_2b03_5da6_b162_63534b950d0d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java lines 224–244

    @Test
    public void testEmptySplitContent() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new TestEncoder());
        ch.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/"));

        ch.writeOutbound(new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK));
        assertEncodedResponse(ch);

        ch.writeOutbound(LastHttpContent.EMPTY_LAST_CONTENT);
        HttpContent chunk = ch.readOutbound();
        assertEquals("0", chunk.content().toString(CharsetUtil.US_ASCII));
        assertInstanceOf(HttpContent.class, chunk);
        chunk.release();

        chunk = ch.readOutbound();
        assertFalse(chunk.content().isReadable());
        assertInstanceOf(LastHttpContent.class, chunk);
        chunk.release();

        assertNull(ch.readOutbound());
    }

Domain

Subdomains

Frequently Asked Questions

What does testEmptySplitContent() do?
testEmptySplitContent() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java.
Where is testEmptySplitContent() defined?
testEmptySplitContent() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java at line 224.
What does testEmptySplitContent() call?
testEmptySplitContent() calls 1 function(s): assertEncodedResponse.

Analyze Your Own Codebase

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

Try Supermodel Free