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 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 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); }
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); }
public void MoveNodeBeforeSiblingWithNullChildNodeThrows() { TestConfigurationNode testNode = new TestConfigurationNode("Test"); testNode.MoveBefore(null, null); }