2
using MonoDevelop.XmlEditor;
6
namespace MonoDevelop.XmlEditor.Tests.Paths
9
public class SingleElementPathTestFixture
12
QualifiedName qualifiedName;
17
path = new XmlElementPath();
18
qualifiedName = new QualifiedName("foo", "http://foo");
19
path.Elements.Add(qualifiedName);
23
public void HasOneItem()
25
Assert.AreEqual(1, path.Elements.Count,
26
"Should have 1 element.");
30
public void RemoveLastItem()
32
path.Elements.RemoveLast();
33
Assert.AreEqual(0, path.Elements.Count, "Should have no items.");
37
public void Equality()
39
XmlElementPath newPath = new XmlElementPath();
40
newPath.Elements.Add(new QualifiedName("foo", "http://foo"));
42
Assert.IsTrue(newPath.Equals(path), "Should be equal.");
46
public void NotEqual()
48
XmlElementPath newPath = new XmlElementPath();
49
newPath.Elements.Add(new QualifiedName("Foo", "bar"));
51
Assert.IsFalse(newPath.Equals(path), "Should not be equal.");