Home / Function/ testJsonArrayOverMultipleWrites() — netty Function Reference

testJsonArrayOverMultipleWrites() — netty Function Reference

Architecture documentation for the testJsonArrayOverMultipleWrites() function in JsonObjectDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9411229a_11c7_135f_2443_eae9876eecb8["testJsonArrayOverMultipleWrites()"]
  6e0a0e48_218c_0ee1_ac6e_2abf169a9f38["JsonObjectDecoderTest"]
  9411229a_11c7_135f_2443_eae9876eecb8 -->|defined in| 6e0a0e48_218c_0ee1_ac6e_2abf169a9f38
  style 9411229a_11c7_135f_2443_eae9876eecb8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java lines 76–98

    @Test
    public void testJsonArrayOverMultipleWrites() {
        EmbeddedChannel ch = new EmbeddedChannel(new JsonObjectDecoder());

        String arrayPart1 = "[{\"test";
        String arrayPart2 = "case\"  : \"\\\"}]Escaped dou\\\"ble quotes \\\" in JSON str\\\"ing\"";
        String arrayPart3 = "  }\n\n    , ";
        String arrayPart4 = "{\"testcase\" : \"Streaming string me";
        String arrayPart5 = "ssage\"} ]";

        // Test array
        ch.writeInbound(Unpooled.copiedBuffer("   " + arrayPart1, CharsetUtil.UTF_8));
        ch.writeInbound(Unpooled.copiedBuffer(arrayPart2, CharsetUtil.UTF_8));
        ch.writeInbound(Unpooled.copiedBuffer(arrayPart3, CharsetUtil.UTF_8));
        ch.writeInbound(Unpooled.copiedBuffer(arrayPart4, CharsetUtil.UTF_8));
        ch.writeInbound(Unpooled.copiedBuffer(arrayPart5 + "      ", CharsetUtil.UTF_8));

        ByteBuf res = ch.readInbound();
        assertEquals(arrayPart1 + arrayPart2 + arrayPart3 + arrayPart4 + arrayPart5, res.toString(CharsetUtil.UTF_8));
        res.release();

        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testJsonArrayOverMultipleWrites() do?
testJsonArrayOverMultipleWrites() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java.
Where is testJsonArrayOverMultipleWrites() defined?
testJsonArrayOverMultipleWrites() is defined in codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java at line 76.

Analyze Your Own Codebase

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

Try Supermodel Free