示例#1
0
 public void Parse_null_should_throw_exception()
 {
     XmlPathRoot.Parse(null);
 }
示例#2
0
        public void Formats_loose_path_with_one_element()
        {
            var actual = XmlPathRoot.Element("Root").ToString();

            Assert.AreEqual("/Root", actual);
        }
示例#3
0
        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);
        }
示例#4
0
 public void Attribute_with_null_name_should_throw_exception()
 {
     XmlPathRoot.Element("Element").Attribute(null);
 }
示例#5
0
 public void Attribute_with_empty_name_should_throw_exception()
 {
     XmlPathRoot.Element("Element").Attribute(String.Empty);
 }
示例#6
0
 public void Element_with_empty_name_should_throw_exception()
 {
     XmlPathRoot.Element(String.Empty);
 }
示例#7
0
 public void Element_with_null_name_should_throw_exception()
 {
     XmlPathRoot.Element(null);
 }
示例#8
0
        public void Parsee_strict(string input)
        {
            var path = XmlPathRoot.Parse(input);

            Assert.AreEqual(input, path.ToString());
        }
示例#9
0
 public void Parsee_strict_invalid_input_should_throw_exception(string input)
 {
     XmlPathRoot.Parse(input);
 }
示例#10
0
 /// <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));
 }