Merge() public method

This is the main entry point.
public Merge ( XmlNode newMaster, XmlNode oldConfigured, XmlDocument dest, string oldLayoutSuffix ) : XmlNode
newMaster System.Xml.XmlNode
oldConfigured System.Xml.XmlNode
dest System.Xml.XmlDocument
oldLayoutSuffix string
return System.Xml.XmlNode
Ejemplo n.º 1
0
		void TestMerge(string newMaster, string user, string expectedOutput, string suffix)
		{
			var newMasterDoc = new XmlDocument();
			newMasterDoc.LoadXml(newMaster);
			var userDoc = new XmlDocument();
			userDoc.LoadXml(user);
			var outputDoc = new XmlDocument();
			var merger = new LayoutMerger();
			XmlNode output = merger.Merge(newMasterDoc.DocumentElement, userDoc.DocumentElement, outputDoc, suffix);
			var expectedDoc = new XmlDocument();
			expectedDoc.LoadXml(expectedOutput);
			Assert.IsTrue(XmlUtils.NodesMatch(output, expectedDoc.DocumentElement));
		}
Ejemplo n.º 2
0
		void TestMerge(string current, string user, string expectedOutput)
		{
			XmlDocument currentDoc = new XmlDocument();
			currentDoc.LoadXml(current);
			XmlDocument userDoc = new XmlDocument();
			userDoc.LoadXml(user);
			XmlDocument outputDoc = new XmlDocument();
			LayoutMerger merger = new LayoutMerger();
			XmlNode output = merger.Merge(currentDoc.DocumentElement, userDoc.DocumentElement, outputDoc);
			XmlDocument expectedDoc = new XmlDocument();
			expectedDoc.LoadXml(expectedOutput);
			Assert.IsTrue(XmlUtils.NodesMatch(output, expectedDoc.DocumentElement));
		}