public void InvalidKeyNode() { string bad = "<Test></Test>"; XmlDocument doc = new XmlDocument(); doc.LoadXml(bad); KeyInfoNode node1 = new KeyInfoNode(); node1.LoadXml(null); Assert.Null(node1.GetValue()); }
public void NewKeyNode() { string test = "<Test></Test>"; XmlDocument doc = new XmlDocument(); doc.LoadXml(test); KeyInfoNode node1 = new KeyInfoNode(); node1.SetValue(doc.DocumentElement); XmlElement xel = node1.GetXml(); KeyInfoNode node2 = new KeyInfoNode(node1.GetValue()); node2.LoadXml(xel); Assert.Equal((node1.GetXml().OuterXml), (node2.GetXml().OuterXml)); }