public void Parse_null_should_throw_exception() { XmlPathRoot.Parse(null); }
public void Formats_loose_path_with_one_element() { var actual = XmlPathRoot.Element("Root").ToString(); Assert.AreEqual("/Root", actual); }
public void Formats_complex_loose_path() { var actual = XmlPathRoot.Element("Root").Element("Parent").Element("Child").Attribute("value").ToString(); Assert.AreEqual("/Root/Parent/Child:value", actual); }
public void Attribute_with_null_name_should_throw_exception() { XmlPathRoot.Element("Element").Attribute(null); }
public void Attribute_with_empty_name_should_throw_exception() { XmlPathRoot.Element("Element").Attribute(String.Empty); }
public void Element_with_empty_name_should_throw_exception() { XmlPathRoot.Element(String.Empty); }
public void Element_with_null_name_should_throw_exception() { XmlPathRoot.Element(null); }
public void Parsee_strict(string input) { var path = XmlPathRoot.Parse(input); Assert.AreEqual(input, path.ToString()); }
public void Parsee_strict_invalid_input_should_throw_exception(string input) { XmlPathRoot.Parse(input); }
/// <summary> /// Starts the construction of a path. /// </summary> /// <param name="elementName">The name of the first element.</param> /// <returns>A path that can be further extended.</returns> public static IXmlPathLooseOpen Element(string elementName) { return(XmlPathRoot.Element(elementName)); }