~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
using MonoDevelop.XmlEditor;
 
3
using NUnit.Framework;
 
4
using System;
 
5
 
 
6
namespace MonoDevelop.XmlEditor.Tests.Paths
 
7
{
 
8
        [TestFixture]
 
9
        public class NoElementPathTestFixture
 
10
        {
 
11
                XmlElementPath path;
 
12
                
 
13
                [TestFixtureSetUp]
 
14
                public void FixtureSetUp()
 
15
                {
 
16
                        path = new XmlElementPath();
 
17
                }
 
18
                
 
19
                [Test]
 
20
                public void HasNoItems()
 
21
                {
 
22
                        Assert.AreEqual(0, path.Elements.Count, 
 
23
                                        "Should not be any elements.");
 
24
                }
 
25
                
 
26
                [Test]
 
27
                public void Equality()
 
28
                {
 
29
                        XmlElementPath newPath = new XmlElementPath();
 
30
                        
 
31
                        Assert.IsTrue(newPath.Equals(path), "Should be equal.");
 
32
                }
 
33
                
 
34
                [Test]
 
35
                public void NotEqual()
 
36
                {
 
37
                        XmlElementPath newPath = new XmlElementPath();
 
38
                        newPath.Elements.Add(new QualifiedName("Foo", "bar"));
 
39
                        
 
40
                        Assert.IsFalse(newPath.Equals(path), "Should not be equal.");
 
41
                }               
 
42
                
 
43
                [Test]
 
44
                public void Compact()
 
45
                {
 
46
                        path.Compact();
 
47
                        Equality();
 
48
                }
 
49
        }
 
50
}