Home / Function/ testNonJsonContent2() — netty Function Reference

testNonJsonContent2() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java lines 271–290

    @Test
    public void testNonJsonContent2() {
        final EmbeddedChannel ch = new EmbeddedChannel(new JsonObjectDecoder());
        ch.writeInbound(Unpooled.copiedBuffer("  [1,2,3]  ", CharsetUtil.UTF_8));

        ByteBuf res = ch.readInbound();
        assertEquals("[1,2,3]", res.toString(CharsetUtil.UTF_8));
        res.release();

        try {
            assertThrows(CorruptedFrameException.class, new Executable() {
                @Override
                public void execute() {
                    ch.writeInbound(Unpooled.copiedBuffer(" a {\"key\" : 10}", CharsetUtil.UTF_8));
                }
            });
        } finally {
            assertFalse(ch.finish());
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free