shouldDecodeRequestWithSimpleXml() — netty Function Reference
Architecture documentation for the shouldDecodeRequestWithSimpleXml() function in XmlDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3ecf4d63_ddf8_eb13_f06c_45dc5a335c62["shouldDecodeRequestWithSimpleXml()"] 71eec9e7_c739_c052_076b_29d3db70b0ba["XmlDecoderTest"] 3ecf4d63_ddf8_eb13_f06c_45dc5a335c62 -->|defined in| 71eec9e7_c739_c052_076b_29d3db70b0ba 5d218799_ef8a_7b9b_ae2d_2b4c7274a9db["write()"] 3ecf4d63_ddf8_eb13_f06c_45dc5a335c62 -->|calls| 5d218799_ef8a_7b9b_ae2d_2b4c7274a9db style 3ecf4d63_ddf8_eb13_f06c_45dc5a335c62 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-xml/src/test/java/io/netty/handler/codec/xml/XmlDecoderTest.java lines 70–226
@Test
public void shouldDecodeRequestWithSimpleXml() {
Object temp;
write(XML1);
temp = channel.readInbound();
assertInstanceOf(XmlDocumentStart.class, temp);
assertEquals("1.0", ((XmlDocumentStart) temp).version());
assertEquals("UTF-8", ((XmlDocumentStart) temp).encoding());
assertFalse(((XmlDocumentStart) temp).standalone());
assertNull(((XmlDocumentStart) temp).encodingScheme());
temp = channel.readInbound();
assertInstanceOf(XmlDTD.class, temp);
assertEquals("employee.dtd", ((XmlDTD) temp).text());
temp = channel.readInbound();
assertInstanceOf(XmlProcessingInstruction.class, temp);
assertEquals("xml-stylesheet", ((XmlProcessingInstruction) temp).target());
assertEquals("type=\"text/css\" href=\"netty.css\"", ((XmlProcessingInstruction) temp).data());
temp = channel.readInbound();
assertInstanceOf(XmlProcessingInstruction.class, temp);
assertEquals("xml-test", ((XmlProcessingInstruction) temp).target());
assertEquals("", ((XmlProcessingInstruction) temp).data());
temp = channel.readInbound();
assertInstanceOf(XmlElementStart.class, temp);
assertEquals("employee", ((XmlElementStart) temp).name());
assertEquals("", ((XmlElementStart) temp).prefix());
assertEquals("", ((XmlElementStart) temp).namespace());
assertEquals(0, ((XmlElementStart) temp).attributes().size());
assertEquals(1, ((XmlElementStart) temp).namespaces().size());
assertEquals("nettya", ((XmlElementStart) temp).namespaces().get(0).prefix());
assertEquals("https://netty.io/netty/a", ((XmlElementStart) temp).namespaces().get(0).uri());
temp = channel.readInbound();
assertInstanceOf(XmlElementStart.class, temp);
assertEquals("id", ((XmlElementStart) temp).name());
assertEquals("nettya", ((XmlElementStart) temp).prefix());
assertEquals("https://netty.io/netty/a", ((XmlElementStart) temp).namespace());
assertEquals(0, ((XmlElementStart) temp).attributes().size());
assertEquals(0, ((XmlElementStart) temp).namespaces().size());
temp = channel.readInbound();
assertInstanceOf(XmlEntityReference.class, temp);
assertEquals("plusmn", ((XmlEntityReference) temp).name());
assertEquals("", ((XmlEntityReference) temp).text());
temp = channel.readInbound();
assertInstanceOf(XmlCharacters.class, temp);
assertEquals("1", ((XmlCharacters) temp).data());
temp = channel.readInbound();
assertInstanceOf(XmlElementEnd.class, temp);
assertEquals("id", ((XmlElementEnd) temp).name());
assertEquals("nettya", ((XmlElementEnd) temp).prefix());
assertEquals("https://netty.io/netty/a", ((XmlElementEnd) temp).namespace());
temp = channel.readInbound();
assertInstanceOf(XmlCharacters.class, temp);
assertEquals("\n", ((XmlCharacters) temp).data());
temp = channel.readInbound();
assertNull(temp);
write(XML2);
temp = channel.readInbound();
assertInstanceOf(XmlElementStart.class, temp);
assertEquals("name", ((XmlElementStart) temp).name());
assertEquals("", ((XmlElementStart) temp).prefix());
assertEquals("", ((XmlElementStart) temp).namespace());
assertEquals(1, ((XmlElementStart) temp).attributes().size());
assertEquals("type", ((XmlElementStart) temp).attributes().get(0).name());
assertEquals("given", ((XmlElementStart) temp).attributes().get(0).value());
assertEquals("", ((XmlElementStart) temp).attributes().get(0).prefix());
assertEquals("", ((XmlElementStart) temp).attributes().get(0).namespace());
assertEquals(0, ((XmlElementStart) temp).namespaces().size());
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does shouldDecodeRequestWithSimpleXml() do?
shouldDecodeRequestWithSimpleXml() is a function in the netty codebase, defined in codec-xml/src/test/java/io/netty/handler/codec/xml/XmlDecoderTest.java.
Where is shouldDecodeRequestWithSimpleXml() defined?
shouldDecodeRequestWithSimpleXml() is defined in codec-xml/src/test/java/io/netty/handler/codec/xml/XmlDecoderTest.java at line 70.
What does shouldDecodeRequestWithSimpleXml() call?
shouldDecodeRequestWithSimpleXml() calls 1 function(s): write.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free