Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Martinez <joelmartinez@gmail.com>2020-02-21 02:00:51 +0300
committerJoel Martinez <joelmartinez@gmail.com>2020-02-21 02:00:51 +0300
commit9d69b2ee6b4b75791c0a1a2811dcdfd3f154503f (patch)
tree4e5ae9aa579ce7ba8b9ed3775c3d43d2c7452888 /mdoc/mdoc.Test/DocUtilsTests.cs
parenta3dd35be8c04bab718b970c476e809a744984c08 (diff)
msxdoc importer now clears all existing nodes,
Except for undocumented nodes, and nodes that don't have an incoming equivalent. Closes #391. Closes Internal Item https://ceapex.visualstudio.com/Engineering/_workitems/edit/173471
Diffstat (limited to 'mdoc/mdoc.Test/DocUtilsTests.cs')
-rw-r--r--mdoc/mdoc.Test/DocUtilsTests.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/mdoc/mdoc.Test/DocUtilsTests.cs b/mdoc/mdoc.Test/DocUtilsTests.cs
index 2a86e5b6..d5f01a05 100644
--- a/mdoc/mdoc.Test/DocUtilsTests.cs
+++ b/mdoc/mdoc.Test/DocUtilsTests.cs
@@ -1,6 +1,7 @@
using mdoc.Test.SampleClasses;
using Mono.Documentation.Updater;
using NUnit.Framework;
+using System.Xml;
namespace mdoc.Test
{
@@ -46,5 +47,25 @@ namespace mdoc.Test
Assert.IsTrue(isIgnoredPropertyGeneratedMethod);
}
+
+ [Test]
+ public void TestNodeCleaner()
+ {
+ string xml = @"<Docs>
+ <summary>To be added.</summary>
+ <param name=""one"">To be added.</param>
+ <param name=""two"">written docs</param>
+<param name=""three"">Written but not provided</param>
+</Docs>"; string xml2 = @"<Docs>
+ <param name=""two"">written docs</param>
+</Docs>";
+ XmlDocument doc = new XmlDocument();
+ doc.LoadXml(xml);
+
+ XmlDocument incomingDoc = new XmlDocument();
+ incomingDoc.LoadXml(xml2);
+ DocUtils.ClearNodesIfNotDefault(doc.FirstChild, incomingDoc.FirstChild);
+ Assert.IsTrue(doc.FirstChild.ChildNodes.Count == 3) ;
+ }
}
} \ No newline at end of file