Exemplo n.º 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");
        }
Exemplo n.º 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");
        }
Exemplo n.º 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 == "&&");
        }
Exemplo n.º 4
0
 protected void set_attribute(string name, string val)
 {
     XMLUtilities.set_attribute(name, val, this);
 }
Exemplo n.º 5
0
 public void will_ignore_null_element()
 {
     XMLUtilities.set_attribute("foo", "bar", null);
 }