XmlDecoderTest.java — netty Source File
Architecture documentation for XmlDecoderTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2014 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.codec.xml;
import io.netty.buffer.Unpooled;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.util.CharsetUtil;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Verifies the basic functionality of the {@link XmlDecoder}.
* XML borrowed from
* <a href="https://www.studytrails.com/java/xml/woodstox/java-xml-woodstox-validation-xml-schema.jsp">
* Woodstox : Validate against XML Schema</a>
*/
public class XmlDecoderTest {
private static final String XML1 = "<?xml version=\"1.0\"?>" +
"<!DOCTYPE employee SYSTEM \"employee.dtd\">" +
"<?xml-stylesheet type=\"text/css\" href=\"netty.css\"?>" +
"<?xml-test ?>" +
"<employee xmlns:nettya=\"https://netty.io/netty/a\">" +
"<nettya:id>±1</nettya:id>\n" +
"<name ";
private static final String XML2 = "type=\"given\">Alba</name><![CDATA[ <some data >/> ]]>" +
" <!-- namespaced --><nettyb:salary xmlns:nettyb=\"https://netty.io/netty/b\" nettyb:period=\"weekly\">" +
"100</nettyb:salary><last/></employee>";
private static final String XML3 = "<?xml version=\"1.1\" encoding=\"UTf-8\" standalone=\"yes\"?><netty></netty>";
private static final String XML4 = "<netty></netty>";
private EmbeddedChannel channel;
@BeforeEach
public void setup() throws Exception {
channel = new EmbeddedChannel(new XmlDecoder());
}
// ... (242 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does XmlDecoderTest.java do?
XmlDecoderTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is XmlDecoderTest.java in the architecture?
XmlDecoderTest.java is located at codec-xml/src/test/java/io/netty/handler/codec/xml/XmlDecoderTest.java (domain: Buffer, subdomain: Allocators, directory: codec-xml/src/test/java/io/netty/handler/codec/xml).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free