public void CopyWithParamDefaults() { XmlDocument docSrc = new XmlDocument(); docSrc.LoadXml( "<column label=\"Gloss\"> " + "<seq field=\"Senses\" sep=\"$delimiter=commaSpace\"> " + "<string field=\"Gloss\" ws=\"$ws=analysis\"/> " + "</seq> " + "</column>"); XmlNode source = GetRootNode(docSrc, "column"); Assert.IsNotNull(source); XmlNode output = XmlViewsUtils.CopyWithParamDefaults(source); Assert.IsNotNull(output); Assert.IsFalse(source == output); XmlDocument docExpected = new XmlDocument(); docExpected.LoadXml( "<column label=\"Gloss\"> " + "<seq field=\"Senses\" sep=\"commaSpace\"> " + "<string field=\"Gloss\" ws=\"analysis\"/> " + "</seq> " + "</column>"); XmlNode expected = GetRootNode(docExpected, "column"); Assert.IsTrue(NodesMatch(output, expected)); }
public void TrivialCopyWithParamDefaults() { XmlDocument docSrc = new XmlDocument(); docSrc.LoadXml( "<column label=\"Gloss\"> " + "<seq field=\"Senses\" sep=\"commaSpace\"> " + "<string field=\"Gloss\" ws=\"analysis\"/> " + "</seq> " + "</column>"); XmlNode source = GetRootNode(docSrc, "column"); Assert.IsNotNull(source); XmlNode output = XmlViewsUtils.CopyWithParamDefaults(source); Assert.IsTrue(source == output); }