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 == ""); }
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); }
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 == "&&"); }
protected string test_attribute(string name) { return(XMLUtilities.test_attribute(name, this)); }