public void RemoveAttributeTest() { var node = m_xml.SelectSingleNode("//*[@type]"); Assert.AreEqual <string>("BoarCat", node.InnerText, "Expected something else for the inner text of the node with a 'type' attribute"); Assert.AreEqual <int>(1, node.Attributes.Count, "Count of attributes is wrong"); var removed = XmlExtensions.RemoveAttribute(node, "type"); Assert.AreEqual <int>(0, node.Attributes.Count, "Count of attributes is wrong after removing one"); Assert.IsTrue(removed, "Something should have been removed."); removed = XmlExtensions.RemoveAttribute(m_xml, "notThere"); Assert.IsFalse(removed, "Nothing should have been removed"); }