public void NotEqual() { XmlElementPath newPath = new XmlElementPath(); newPath.Elements.Add(new QualifiedName("Foo", "bar")); Assert.IsFalse(newPath.Equals(path), "Should not be equal."); }
public void Equality() { XmlElementPath newPath = new XmlElementPath(); newPath.Elements.Add(new QualifiedName("foo", "http://foo")); Assert.IsTrue(newPath.Equals(path), "Should be equal."); }
public void PathTest4() { string text = "<x:foo xmlns:x='" + namespaceURI + "' "; elementPath = XmlParser.GetActiveElementStartPath(text, text.Length); expectedElementPath = new XmlElementPath(); expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI, "x")); Assert.IsTrue(expectedElementPath.Equals(elementPath), "Incorrect active element path."); }
public void SuccessTest4() { string text = "<bar xmlns='http://test.com'><foo xmlns='" + namespaceURI + "' ><"; elementPath = XmlParser.GetParentElementPath(text); expectedElementPath = new XmlElementPath(); expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI)); Assert.IsTrue(elementPath.Equals(expectedElementPath), "Incorrect active element path."); }
public void PathTest5() { string text = "<foo xmlns='" + namespaceURI + "'><bar a='a'>"; elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("='a'")); expectedElementPath = new XmlElementPath(); expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI)); expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI)); Assert.IsTrue(elementPath.Equals(expectedElementPath), "Incorrect active element path."); }
public void CompactPathItem() { XmlElementPath newPath = new XmlElementPath(); newPath.Elements.Add(new QualifiedName("bar", "http://bar", "b")); path.Compact(); Assert.IsTrue(newPath.Equals(path), "Should be equal."); }
public void Equality() { XmlElementPath newPath = new XmlElementPath(); Assert.IsTrue(newPath.Equals(path), "Should be equal."); }