testStreamArrayElementsSimple() — netty Function Reference
Architecture documentation for the testStreamArrayElementsSimple() function in JsonObjectDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1401cedb_2123_90c1_2209_f976bf160f09["testStreamArrayElementsSimple()"] 6e0a0e48_218c_0ee1_ac6e_2abf169a9f38["JsonObjectDecoderTest"] 1401cedb_2123_90c1_2209_f976bf160f09 -->|defined in| 6e0a0e48_218c_0ee1_ac6e_2abf169a9f38 style 1401cedb_2123_90c1_2209_f976bf160f09 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java lines 346–385
@Test
public void testStreamArrayElementsSimple() {
EmbeddedChannel ch = new EmbeddedChannel(new JsonObjectDecoder(Integer.MAX_VALUE, true));
String array = "[ 12, \"bla\" , 13.4 \t ,{\"key0\" : [1,2], \"key1\" : 12, \"key2\" : {}} , " +
"true, false, null, [\"bla\", {}, [1,2,3]] ]";
String object = "{\"bla\" : \"blub\"}";
ch.writeInbound(Unpooled.copiedBuffer(array, CharsetUtil.UTF_8));
ch.writeInbound(Unpooled.copiedBuffer(object, CharsetUtil.UTF_8));
ByteBuf res = ch.readInbound();
assertEquals("12", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals("\"bla\"", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals("13.4", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals("{\"key0\" : [1,2], \"key1\" : 12, \"key2\" : {}}", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals("true", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals("false", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals("null", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals("[\"bla\", {}, [1,2,3]]", res.toString(CharsetUtil.UTF_8));
res.release();
res = ch.readInbound();
assertEquals(object, res.toString(CharsetUtil.UTF_8));
res.release();
assertFalse(ch.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testStreamArrayElementsSimple() do?
testStreamArrayElementsSimple() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java.
Where is testStreamArrayElementsSimple() defined?
testStreamArrayElementsSimple() is defined in codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java at line 346.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free