Exemple #1
0
        public void will_ignore_null_value()
        {
            XElement el = XElement.Parse("<fooBar foo=\"bar\" />");

            XMLUtilities.set_attribute("foo", null, el);
            Assert.That(el.Attribute("foo").Value == "bar");
        }
Exemple #2
0
        public void can_set_value_for_existing_attribute()
        {
            XElement el = XElement.Parse("<fooBar foo=\"bar\" />");

            XMLUtilities.set_attribute("foo", "bel", el);
            Assert.That(el.Attribute("foo").Value == "bel");
        }
Exemple #3
0
        public void can_set_and_get_attribute()
        {
            var el = new XElement("test", "foo");

            XMLUtilities.set_attribute("bar", "&&", el);
            string bar = XMLUtilities.test_attribute("bar", el);

            Assert.That(bar == "&&");
        }
Exemple #4
0
 protected void set_attribute(string name, string val)
 {
     XMLUtilities.set_attribute(name, val, this);
 }
Exemple #5
0
 public void will_ignore_null_element()
 {
     XMLUtilities.set_attribute("foo", "bar", null);
 }