Home / Function/ testDecodeWithXml() — netty Function Reference

testDecodeWithXml() — netty Function Reference

Architecture documentation for the testDecodeWithXml() function in XmlFrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  276d80b1_895a_dd4c_eae7_309a9191f161["testDecodeWithXml()"]
  13b85bd7_07cb_814c_1ac0_dcb1adb68947["XmlFrameDecoderTest"]
  276d80b1_895a_dd4c_eae7_309a9191f161 -->|defined in| 13b85bd7_07cb_814c_1ac0_dcb1adb68947
  cb7dbe25_1a39_5d7b_099a_0363b7fbc37a["testDecodeShortValidXml()"]
  cb7dbe25_1a39_5d7b_099a_0363b7fbc37a -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  5ceb042f_e29f_e8e7_d2d4_f20a4ae36581["testDecodeShortValidXmlWithLeadingWhitespace01()"]
  5ceb042f_e29f_e8e7_d2d4_f20a4ae36581 -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  e14cd8ef_e599_1d24_8ecd_853dbfad433e["testDecodeShortValidXmlWithLeadingWhitespace02()"]
  e14cd8ef_e599_1d24_8ecd_853dbfad433e -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  907f7aec_3fda_73e8_5f00_973337219035["testDecodeShortValidXmlWithLeadingWhitespace02AndTrailingGarbage()"]
  907f7aec_3fda_73e8_5f00_973337219035 -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  2f230c3a_abb9_389a_d104_3340b09fd8d0["testDecodeInvalidXml()"]
  2f230c3a_abb9_389a_d104_3340b09fd8d0 -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  798f0e09_9a49_2e9f_26d4_dbf77c94af2c["testDecodeWithCDATABlock()"]
  798f0e09_9a49_2e9f_26d4_dbf77c94af2c -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  9a4fd67e_b079_7fc0_4717_c4c8655073eb["testDecodeWithCDATABlockContainingNestedUnbalancedXml()"]
  9a4fd67e_b079_7fc0_4717_c4c8655073eb -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  80b6cefb_3ca4_7f2d_1566_afdc62ff30b1["testDecodeWithMultipleMessages()"]
  80b6cefb_3ca4_7f2d_1566_afdc62ff30b1 -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  b5194501_450a_0706_d6a3_62fbd92a207f["testFraming()"]
  b5194501_450a_0706_d6a3_62fbd92a207f -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  61ebe162_b18b_cb4f_93ed_0910e0dbca0a["testDecodeWithSampleXml()"]
  61ebe162_b18b_cb4f_93ed_0910e0dbca0a -->|calls| 276d80b1_895a_dd4c_eae7_309a9191f161
  style 276d80b1_895a_dd4c_eae7_309a9191f161 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-xml/src/test/java/io/netty/handler/codec/xml/XmlFrameDecoderTest.java lines 183–214

    private static void testDecodeWithXml(List<String> xmlFrames, Object... expected) {
        EmbeddedChannel ch = new EmbeddedChannel(new XmlFrameDecoder(1048576));
        Exception cause = null;
        try {
            for (String xmlFrame : xmlFrames) {
                ch.writeInbound(Unpooled.copiedBuffer(xmlFrame, CharsetUtil.UTF_8));
            }
        } catch (Exception e) {
            cause = e;
        }
        List<Object> actual = new ArrayList<Object>();
        for (;;) {
            ByteBuf buf = ch.readInbound();
            if (buf == null) {
                break;
            }
            actual.add(buf.toString(CharsetUtil.UTF_8));
            buf.release();
        }

        if (cause != null) {
            actual.add(cause.getClass());
        }

        try {
            List<Object> expectedList = new ArrayList<Object>();
            Collections.addAll(expectedList, expected);
            assertEquals(expectedList, actual);
        } finally {
            ch.finish();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecodeWithXml() do?
testDecodeWithXml() is a function in the netty codebase, defined in codec-xml/src/test/java/io/netty/handler/codec/xml/XmlFrameDecoderTest.java.
Where is testDecodeWithXml() defined?
testDecodeWithXml() is defined in codec-xml/src/test/java/io/netty/handler/codec/xml/XmlFrameDecoderTest.java at line 183.
What calls testDecodeWithXml()?
testDecodeWithXml() is called by 10 function(s): testDecodeInvalidXml, testDecodeShortValidXml, testDecodeShortValidXmlWithLeadingWhitespace01, testDecodeShortValidXmlWithLeadingWhitespace02, testDecodeShortValidXmlWithLeadingWhitespace02AndTrailingGarbage, testDecodeWithCDATABlock, testDecodeWithCDATABlockContainingNestedUnbalancedXml, testDecodeWithMultipleMessages, and 2 more.

Analyze Your Own Codebase

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

Try Supermodel Free