@@ -48,20 +48,20 @@ public boolean equals(final Object other) {
48
48
/* Test methods
49
49
/***********************************************************************
50
50
*/
51
-
51
+
52
52
public void testDeserializeUnwrappedListWhenLocalNameForRootElementAndXmlPropertyMatch () throws Exception
53
53
{
54
- final String source =
55
- "<test id=\" 0\" >" +
56
- "<test id=\" 0.1\" >" +
57
- "<test id=\" 0.1.1\" />" +
58
- "</test>" +
59
- "<test id=\" 0.2\" />" +
60
- "<test id=\" 0.3\" >" +
61
- "<test id=\" 0.3.1\" />" +
62
- "</test>" +
54
+ final String sourceIndented =
55
+ "<test id=\" 0\" >\n " +
56
+ "<test id=\" 0.1\" >\n " +
57
+ "<test id=\" 0.1.1\" />\n " +
58
+ "</test>\n " +
59
+ "<test id=\" 0.2\" />\n " +
60
+ "<test id=\" 0.3\" >\n " +
61
+ "<test id=\" 0.3.1\" />\n " +
62
+ "</test>\n " +
63
63
"</test>" ;
64
-
64
+ final String sourceCompact = sourceIndented . replaceAll ( " \n " , "" );
65
65
final Issue86 before = new Issue86 ("0" ,
66
66
Arrays .asList (new Issue86 ("0.1" ,
67
67
Arrays .asList (new Issue86 ("0.1.1" , null ))),
@@ -74,11 +74,9 @@ public void testDeserializeUnwrappedListWhenLocalNameForRootElementAndXmlPropert
74
74
mapper .setSerializationInclusion (Include .NON_NULL );
75
75
76
76
final String xml = mapper .writeValueAsString (before );
77
- assertEquals (source , xml );
77
+ assertEquals (sourceCompact , xml );
78
78
79
- final Issue86 after = mapper .readValue (xml , Issue86 .class );
79
+ final Issue86 after = mapper .readValue (sourceIndented , Issue86 .class );
80
80
assertEquals (before , after );
81
81
}
82
-
83
-
84
82
}
0 commit comments