Пример #1
0
        public void will_not_blow_up_on_missing_attribute()
        {
            var    el  = new XElement("test", "foo");
            string bar = XMLUtilities.test_attribute("bar", el);

            Assert.That(bar == "");
        }
Пример #2
0
        public void will_return_value_from_missing_attribute()
        {
            XElement el  = XElement.Parse("<fooBar foo=\"bar\" />");
            string   str = XMLUtilities.test_attribute("snafu", el);

            Assert.IsNotNull(str);
        }
Пример #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 == "&&");
        }
Пример #4
0
 protected string test_attribute(string name)
 {
     return(XMLUtilities.test_attribute(name, this));
 }