Ejemplo n.º 1
0
        public void AddOrUpdateAttribute_Adds()
        {
            var doc = new XmlDocument();

            doc.LoadXml("<world><thailand><chiangmai/></thailand></world>");
            XmlNode node = doc.SelectSingleNode("world/thailand/chiangmai");

            XmlHelpers.AddOrUpdateAttribute(node, "temp", "24");
            AssertThatXmlIn.Dom(doc).HasAtLeastOneMatchForXpath("world/thailand/chiangmai[@temp='24']");
        }