Home / Function/ testEmptyFullContent() — netty Function Reference

testEmptyFullContent() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  aeed9996_2473_220a_bbf3_32ef52fcea5f["testEmptyFullContent()"]
  992a26d3_2083_aeb8_4785_63c545814355["HttpContentEncoderTest"]
  aeed9996_2473_220a_bbf3_32ef52fcea5f -->|defined in| 992a26d3_2083_aeb8_4785_63c545814355
  style aeed9996_2473_220a_bbf3_32ef52fcea5f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java lines 249–271

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

        FullHttpResponse res = new DefaultFullHttpResponse(
                HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.EMPTY_BUFFER);
        ch.writeOutbound(res);

        Object o = ch.readOutbound();
        assertInstanceOf(FullHttpResponse.class, o);

        res = (FullHttpResponse) o;
        assertNull(res.headers().get(HttpHeaderNames.TRANSFER_ENCODING));

        // Content encoding shouldn't be modified.
        assertNull(res.headers().get(HttpHeaderNames.CONTENT_ENCODING));
        assertEquals(0, res.content().readableBytes());
        assertEquals("", res.content().toString(CharsetUtil.US_ASCII));
        res.release();

        assertNull(ch.readOutbound());
    }

Domain

Subdomains

Frequently Asked Questions

What does testEmptyFullContent() do?
testEmptyFullContent() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java.
Where is testEmptyFullContent() defined?
testEmptyFullContent() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java at line 249.

Analyze Your Own Codebase

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

Try Supermodel Free