public void Init()
        {
            XmlElementPath path = new XmlElementPath();

            path.AddElement(new QualifiedName("a", "a-namespace"));
            paths = new XmlElementPathsByNamespace(path);
        }
コード例 #2
0
		public void Init()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("a", "a-namespace"));
			path.AddElement(new QualifiedName("b", "b-namespace"));
			paths = new XmlElementPathsByNamespace(path);
		}
コード例 #3
0
        public void ElementPathsByNamespaceFoo()
        {
            XmlElementPathsByNamespace paths = new XmlElementPathsByNamespace(path);
            XmlElementPath fooPath = paths[0];

            XmlElementPath expectedPath = new XmlElementPath();
            expectedPath.AddElement(new QualifiedName("foo", "http://foo", "f"));

            Assert.IsTrue(expectedPath.Equals(fooPath));
        }
コード例 #4
0
        public void ElementPathsByNamespaceBar()
        {
            XmlElementPathsByNamespace paths = new XmlElementPathsByNamespace(path);
            XmlElementPath barPath = paths[1];

            XmlElementPath expectedPath = new XmlElementPath();
            expectedPath.AddElement(new QualifiedName("bar", "http://bar", "b"));

            Assert.IsTrue(expectedPath.Equals(barPath));
        }
コード例 #5
0
        public void ElementPathsByNamespaceBar()
        {
            XmlElementPathsByNamespace paths   = new XmlElementPathsByNamespace(path);
            XmlElementPath             barPath = paths[1];

            XmlElementPath expectedPath = new XmlElementPath();

            expectedPath.AddElement(new QualifiedName("bar", "http://bar", "b"));

            Assert.IsTrue(expectedPath.Equals(barPath));
        }
コード例 #6
0
        public void ElementPathsByNamespaceFoo()
        {
            XmlElementPathsByNamespace paths   = new XmlElementPathsByNamespace(path);
            XmlElementPath             fooPath = paths[0];

            XmlElementPath expectedPath = new XmlElementPath();

            expectedPath.AddElement(new QualifiedName("foo", "http://foo", "f"));

            Assert.IsTrue(expectedPath.Equals(fooPath));
        }
コード例 #7
0
		public void TwoNamespacesInScopeAndOneNamespaceUsedInPathNamespacesWithoutPathsReturnsUnusedNamespace()
		{
			path.AddElement(new QualifiedName("foo-root", "http://foo"));
			path.NamespacesInScope.Add(fooNamespace);
			path.NamespacesInScope.Add(barNamespace);
			
			XmlElementPathsByNamespace pathsByNamespaces = new XmlElementPathsByNamespace(path);
			
			XmlNamespace[] expectedNamespaces = new XmlNamespace[] {barNamespace};
			Assert.AreEqual(expectedNamespaces, pathsByNamespaces.NamespacesWithoutPaths.ToArray());
		}
コード例 #8
0
        public void TwoNamespacesInScopeAndOneNamespaceUsedInPathNamespacesWithoutPathsReturnsUnusedNamespace()
        {
            path.AddElement(new QualifiedName("foo-root", "http://foo"));
            path.NamespacesInScope.Add(fooNamespace);
            path.NamespacesInScope.Add(barNamespace);

            XmlElementPathsByNamespace pathsByNamespaces = new XmlElementPathsByNamespace(path);

            XmlNamespace[] expectedNamespaces = new XmlNamespace[] { barNamespace };
            Assert.AreEqual(expectedNamespaces, pathsByNamespaces.NamespacesWithoutPaths.ToArray());
        }
コード例 #9
0
        public void TwoElementPathsByNamespace()
        {
            XmlElementPathsByNamespace paths = new XmlElementPathsByNamespace(path);

            Assert.AreEqual(2, paths.Count);
        }
コード例 #10
0
		public void TwoElementPathsByNamespace()
		{
			XmlElementPathsByNamespace paths = new XmlElementPathsByNamespace(path);
			Assert.AreEqual(2, paths.Count);
		}
コード例 #11
0
		public void Init()
		{
			XmlElementPath path = new XmlElementPath();
			paths = new XmlElementPathsByNamespace(path);
		}
        public void Init()
        {
            XmlElementPath path = new XmlElementPath();

            paths = new XmlElementPathsByNamespace(path);
        }