Home / Function/ testDecodeMultipleAttributesWithNoValue() — netty Function Reference

testDecodeMultipleAttributesWithNoValue() — netty Function Reference

Architecture documentation for the testDecodeMultipleAttributesWithNoValue() function in HttpPostStandardRequestDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a75526f9_00ed_6a24_68ec_684b4866b46e["testDecodeMultipleAttributesWithNoValue()"]
  700bdd36_e58a_9cef_6fb4_774362c57167["HttpPostStandardRequestDecoderTest"]
  a75526f9_00ed_6a24_68ec_684b4866b46e -->|defined in| 700bdd36_e58a_9cef_6fb4_774362c57167
  60cb6c7f_94bd_db1f_cddc_21c53027d383["assertMemoryAttribute()"]
  a75526f9_00ed_6a24_68ec_684b4866b46e -->|calls| 60cb6c7f_94bd_db1f_cddc_21c53027d383
  style a75526f9_00ed_6a24_68ec_684b4866b46e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoderTest.java lines 154–171

    @Test
    void testDecodeMultipleAttributesWithNoValue() {
        String requestBody = "key1&key2&key3";

        HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/upload",
                headersFactory().newHeaders().add("Content-Type", "application/x-www-form-urlencoded"));

        HttpPostStandardRequestDecoder decoder = new HttpPostStandardRequestDecoder(httpDiskDataFactory(), request);
        ByteBuf buf = Unpooled.wrappedBuffer(requestBody.getBytes(CharsetUtil.UTF_8));
        DefaultHttpContent httpContent = new DefaultLastHttpContent(buf);
        decoder.offer(httpContent);

        assertEquals(3, decoder.getBodyHttpDatas().size());
        assertMemoryAttribute(decoder.getBodyHttpData("key1"), "");
        assertMemoryAttribute(decoder.getBodyHttpData("key2"), "");
        assertMemoryAttribute(decoder.getBodyHttpData("key3"), "");
        decoder.destroy();
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecodeMultipleAttributesWithNoValue() do?
testDecodeMultipleAttributesWithNoValue() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoderTest.java.
Where is testDecodeMultipleAttributesWithNoValue() defined?
testDecodeMultipleAttributesWithNoValue() is defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoderTest.java at line 154.
What does testDecodeMultipleAttributesWithNoValue() call?
testDecodeMultipleAttributesWithNoValue() calls 1 function(s): assertMemoryAttribute.

Analyze Your Own Codebase

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

Try Supermodel Free