From 2c026eb5f8fdf10285cb4505d95b6dce0d99143d Mon Sep 17 00:00:00 2001 From: stleary Date: Sun, 19 Jul 2015 08:56:20 -0500 Subject: [PATCH] Fixed test shouldHandleIllegalJSONNodeNames --- XMLTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/XMLTest.java b/XMLTest.java index 1c04c1b..ac17508 100644 --- a/XMLTest.java +++ b/XMLTest.java @@ -311,7 +311,13 @@ public class XMLTest { String result = XML.toString(inputJSON); - String expected = "<___IllegalNode>someValue1someValue3"; + /** + * This is invalid XML. Names should not begin with digits or contain + * certain values, including '@'. One possible solution is to replace + * illegal chars with '_', in which case the expected output would be: + * <___IllegalNode>someValue1someValue2 + */ + String expected = "<123IllegalNode>someValue1someValue2"; assertEquals(expected, result); }