-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed the GetXml() of XmlDocument (double declaration) and added GetOriginalXml(). * Format of documents * Removing GetOriginalXml as it's not really possible due to the Parser.
- Loading branch information
1 parent
6ff32c6
commit b6652c3
Showing
3 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Parsers.CommonTests.Xml | ||
{ | ||
using FluentAssertions; | ||
|
||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
using Skyline.DataMiner.CICD.Parsers.Common.Xml; | ||
|
||
[TestClass] | ||
public class XmlDocumentTests | ||
{ | ||
[TestMethod] | ||
public void XmlDocument_GetXml() | ||
{ | ||
// Arrange | ||
const string xml = @"<?xml version=""1.0"" encoding=""utf-8"" ?><abc></abc>"; | ||
const string expectedXml = @"<?xml version=""1.0"" encoding=""utf-8"" ?><abc />"; | ||
|
||
XmlDocument document = XmlDocument.Parse(xml); | ||
|
||
// Act | ||
var result = document.GetXml(); | ||
|
||
// Check | ||
result.Should().BeEquivalentTo(expectedXml); | ||
} | ||
} | ||
} |