diff --git a/Manatee.Json.Tests/XmlExtensionsTest.cs b/Manatee.Json.Tests/XmlExtensionsTest.cs index 7df350ae..0f998fab 100644 --- a/Manatee.Json.Tests/XmlExtensionsTest.cs +++ b/Manatee.Json.Tests/XmlExtensionsTest.cs @@ -576,6 +576,19 @@ public void RoundTrip_StartingWithHorribleMultiRepeatingXml() Assert.AreEqual(expected.ToString(), actual.ToString()); } + [Test] + public void RoundTrip_StartingWithNestingXml() + { + var expected = XElement.Parse(@""); + var expectedJson = JsonValue.Parse(@"{""Items"":{""Item"":[{""Item"":[{""-uid"":""x""},null]},{""Item"":[{""-uid"":""y""},null]},{""Item"":[{""-uid"":""z""},null]}]}}"); + + var toJson = expected.ToJson(); + Assert.AreEqual(expectedJson, toJson); + + var actual = toJson.ToXElement(null); + + Assert.AreEqual(expected.ToString(), actual.ToString()); + } #endregion } }