mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
Unit test for xml formatting
This commit is contained in:
parent
b73b2de5ee
commit
a6421f631d
1 changed files with 12 additions and 0 deletions
|
|
@ -160,5 +160,17 @@ namespace ICD.Common.Utils.Tests.Xml
|
|||
Assert.IsFalse(XmlUtils.IsValidXml(@"<Foo></Bar>"));
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue