JAVA-27775 Fix failing module xml-2 (#15430)
This commit is contained in:
parent
f7d5d62a57
commit
63312fbcf9
4
pom.xml
4
pom.xml
|
@ -905,7 +905,7 @@
|
|||
<module>vertx-modules</module>
|
||||
<module>web-modules</module>
|
||||
<module>webrtc</module>
|
||||
<!--<module>xml-2</module>--><!-- failing after upgrading to jdk17-->
|
||||
<module>xml-2</module>
|
||||
<module>xml</module>
|
||||
<module>xstream</module>
|
||||
</modules>
|
||||
|
@ -1154,7 +1154,7 @@
|
|||
<module>vertx-modules</module>
|
||||
<module>web-modules</module>
|
||||
<module>webrtc</module>
|
||||
<!--<module>xml-2</module>--><!-- failing after upgrading to jdk17-->
|
||||
<module>xml-2</module>
|
||||
<module>xml</module>
|
||||
<module>xstream</module>
|
||||
</modules>
|
||||
|
|
|
@ -41,15 +41,15 @@ public class JsonToXmlUnitTest {
|
|||
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
|
||||
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_1_1, true);
|
||||
String xmlString = xmlMapper.writer().withRootName("root").withDefaultPrettyPrinter().writeValueAsString(jsonNode);
|
||||
Assertions.assertEquals("<?xml version='1.1' encoding='UTF-8'?>\n" +
|
||||
"<root>\n" +
|
||||
" <name>John</name>\n" +
|
||||
" <age>20</age>\n" +
|
||||
" <address>\n" +
|
||||
" <street>Wall Street</street>\n" +
|
||||
" <city>New York</city>\n" +
|
||||
" </address>\n" +
|
||||
"</root>\n", xmlString);
|
||||
Assertions.assertEquals("<?xml version='1.1' encoding='UTF-8'?>" + System.lineSeparator() +
|
||||
"<root>" + System.lineSeparator() +
|
||||
" <name>John</name>" + System.lineSeparator() +
|
||||
" <age>20</age>" + System.lineSeparator() +
|
||||
" <address>" + System.lineSeparator() +
|
||||
" <street>Wall Street</street>" + System.lineSeparator() +
|
||||
" <city>New York</city>" + System.lineSeparator() +
|
||||
" </address>" + System.lineSeparator() +
|
||||
"</root>" + System.lineSeparator(), xmlString);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue