mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
Unit test for xml formatting
This commit is contained in:
@@ -160,5 +160,17 @@ namespace ICD.Common.Utils.Tests.Xml
|
|||||||
Assert.IsFalse(XmlUtils.IsValidXml(@"<Foo></Bar>"));
|
Assert.IsFalse(XmlUtils.IsValidXml(@"<Foo></Bar>"));
|
||||||
Assert.IsTrue(XmlUtils.IsValidXml(EXAMPLE_XML));
|
Assert.IsTrue(XmlUtils.IsValidXml(EXAMPLE_XML));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void FormatTest()
|
||||||
|
{
|
||||||
|
const string xml = "<Test1><Test2></Test2><Test2></Test2></Test1>";
|
||||||
|
const string expected = @"<Test1>
|
||||||
|
<Test2></Test2>
|
||||||
|
<Test2></Test2>
|
||||||
|
</Test1>";
|
||||||
|
|
||||||
|
Assert.AreEqual(expected, XmlUtils.Format(xml));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user