Esempio n. 1
0
        public void MoveNodeBeforeSiblingWithNullParentThrows()
        {
            TestConfigurationNode testNode = new TestConfigurationNode("Test");

            testNode.AddNode(new TestConfigurationNode("BTest"));
            testNode.MoveBefore(testNode.Nodes[0], new TestConfigurationNode("Not A Child"));
        }
Esempio n. 2
0
        public void MoveNodeBeforeSiblingPositionWithNullSiblingNodeThrows()
        {
            TestConfigurationNode testNode = new TestConfigurationNode("Test");

            testNode.AddNode(new TestConfigurationNode("BTest"));
            testNode.AddNode(new TestConfigurationNode("ATest"));
            testNode.AddNode(new TestConfigurationNode("CTest"));
            testNode.MoveBefore(testNode.Nodes[2], null);
        }
Esempio n. 3
0
        public void MoveNodeBeforeSiblingWithDifferentParrent()
        {
            TestConfigurationNode testNode = new TestConfigurationNode("Test");

            testNode.AddNode(new TestConfigurationNode("BTest"));
            TestConfigurationNode testNode2 = new TestConfigurationNode("Test2");

            testNode2.AddNode(new TestConfigurationNode("ATest"));
            testNode.MoveBefore(testNode2.Nodes[0], testNode.Nodes[0]);
        }
        public void MoveBeforeTestWithNullSiblingNode()
        {
            TestConfigurationNode testNode = new TestConfigurationNode("Test");

            CreateHierarchyAndAddToHierarchyService(testNode, CreateDefaultConfiguration());
            testNode.AddNode(new TestConfigurationNode("BTest"));
            testNode.AddNode(new TestConfigurationNode("ATest"));
            testNode.AddNode(new TestConfigurationNode("CTest"));
            testNode.MoveBefore(testNode.ChildNodes[2], null);
        }
Esempio n. 5
0
        public void CanMoveNodeBeforePreviousSiblingPosition()
        {
            TestConfigurationNode testNode = new TestConfigurationNode("Test");

            testNode.AddNode(new TestConfigurationNode("BTest"));
            testNode.AddNode(new TestConfigurationNode("ATest"));
            testNode.AddNode(new TestConfigurationNode("CTest"));
            ConfigurationNode nodeA = (ConfigurationNode)testNode.Nodes[1];

            testNode.MoveBefore(testNode.Nodes[2], nodeA);
            Assert.AreEqual("CTest", nodeA.PreviousSibling.Name);
        }
        public void MoveBeforeTest()
        {
            TestConfigurationNode testNode = new TestConfigurationNode("Test");

            CreateHierarchyAndAddToHierarchyService(testNode, CreateDefaultConfiguration());
            testNode.AddNode(new TestConfigurationNode("BTest"));
            testNode.AddNode(new TestConfigurationNode("ATest"));
            testNode.AddNode(new TestConfigurationNode("CTest"));
            ConfigurationNode nodeA = testNode.ChildNodes[1];

            testNode.MoveBefore(testNode.ChildNodes[2], nodeA);
            Assert.AreEqual("CTest", nodeA.PreviousSibling.Name);
        }
Esempio n. 7
0
        public void MoveNodeBeforeSiblingWithNullChildNodeThrows()
        {
            TestConfigurationNode testNode = new TestConfigurationNode("Test");

            testNode.MoveBefore(null, null);
        }
 public void MoveNodeBeforeSiblingWithDifferentParrent()
 {
     TestConfigurationNode testNode = new TestConfigurationNode("Test");
     testNode.AddNode(new TestConfigurationNode("BTest"));
     TestConfigurationNode testNode2 = new TestConfigurationNode("Test2");
     testNode2.AddNode(new TestConfigurationNode("ATest"));
     testNode.MoveBefore(testNode2.Nodes[0], testNode.Nodes[0]);
 }
 public void MoveNodeBeforeSiblingWithNullParentThrows()
 {
     TestConfigurationNode testNode = new TestConfigurationNode("Test");
     testNode.AddNode(new TestConfigurationNode("BTest"));
     testNode.MoveBefore(testNode.Nodes[0], new TestConfigurationNode("Not A Child"));
 }
 public void MoveNodeBeforeSiblingWithNullChildNodeThrows()
 {
     TestConfigurationNode testNode = new TestConfigurationNode("Test");
     testNode.MoveBefore(null, null);
 }
 public void MoveNodeBeforeSiblingPositionWithNullSiblingNodeThrows()
 {
     TestConfigurationNode testNode = new TestConfigurationNode("Test");
     testNode.AddNode(new TestConfigurationNode("BTest"));
     testNode.AddNode(new TestConfigurationNode("ATest"));
     testNode.AddNode(new TestConfigurationNode("CTest"));
     testNode.MoveBefore(testNode.Nodes[2], null);
 }
		public void CanMoveNodeBeforePreviousSiblingPosition()
		{
			TestConfigurationNode testNode = new TestConfigurationNode("Test");			
			testNode.AddNode(new TestConfigurationNode("BTest"));
			testNode.AddNode(new TestConfigurationNode("ATest"));
			testNode.AddNode(new TestConfigurationNode("CTest"));
			ConfigurationNode nodeA = (ConfigurationNode)testNode.Nodes[1];
			testNode.MoveBefore(testNode.Nodes[2], nodeA);
			Assert.AreEqual("CTest", nodeA.PreviousSibling.Name);
		}
Esempio n. 13
0
 public void MoveBeforeTestWithNullSiblingNode()
 {
     TestConfigurationNode testNode = new TestConfigurationNode("Test");
     CreateHierarchyAndAddToHierarchyService(testNode, CreateDefaultConfiguration());
     testNode.AddNode(new TestConfigurationNode("BTest"));
     testNode.AddNode(new TestConfigurationNode("ATest"));
     testNode.AddNode(new TestConfigurationNode("CTest"));
     testNode.MoveBefore(testNode.ChildNodes[2], null);
 }
Esempio n. 14
0
 public void MoveBeforeTest()
 {
     TestConfigurationNode testNode = new TestConfigurationNode("Test");
     CreateHierarchyAndAddToHierarchyService(testNode, CreateDefaultConfiguration());
     testNode.AddNode(new TestConfigurationNode("BTest"));
     testNode.AddNode(new TestConfigurationNode("ATest"));
     testNode.AddNode(new TestConfigurationNode("CTest"));
     ConfigurationNode nodeA = testNode.ChildNodes[1];
     testNode.MoveBefore(testNode.ChildNodes[2], nodeA);
     Assert.AreEqual("CTest", nodeA.PreviousSibling.Name);
 }