public void AddParentNode(ExecutionNode nodeToManipulate)
 {
     if (nodeToManipulate != null)
     {
         var newNode = nodeToManipulate.AddParent(1);
         _projectViewModel.SelectedExecutionNode = newNode;
     }
 }
        public void ShouldNotBeAbleToAddParentToRoot()
        {
            ExecutionNode root     = ExecutionNode.CreateLevelOneNode(1, "Root");
            var           customer = root.AddChild(1, "Customer");
            var           order    = customer.AddChild(10, "Order");

            string beforeAddingParent = root.getDebugString();

            var returnNode = root.AddParent(1, "Nono");

            Assert.That(returnNode, Is.EqualTo(root));
            Assert.That(root.getDebugString(), Is.EqualTo(beforeAddingParent));
        }