~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/XmlEditor/Test/Paths/SingleElementPathByNamespaceTestFixture.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using ICSharpCode.XmlEditor;
 
6
using NUnit.Framework;
 
7
 
 
8
namespace XmlEditor.Tests.Paths
 
9
{
 
10
        [TestFixture]
 
11
        public class SingleElementPathByNamespaceTestFixture
 
12
        {
 
13
                XmlElementPathsByNamespace paths;
 
14
                
 
15
                [SetUp]
 
16
                public void Init()
 
17
                {
 
18
                        XmlElementPath path = new XmlElementPath();
 
19
                        path.AddElement(new QualifiedName("a", "a-namespace"));
 
20
                        paths = new XmlElementPathsByNamespace(path);
 
21
                }
 
22
                
 
23
                [Test]
 
24
                public void HasSingleXmlElementPath()
 
25
                {
 
26
                        Assert.AreEqual(1, paths.Count);
 
27
                }
 
28
                
 
29
                [Test]
 
30
                public void XmlElementPathHasOneElement()
 
31
                {
 
32
                        XmlElementPath expectedPath = new XmlElementPath();
 
33
                        expectedPath.AddElement(new QualifiedName("a", "a-namespace"));
 
34
                        
 
35
                        Assert.AreEqual(expectedPath, paths[0]);
 
36
                }
 
37
        }
 
38
}