src/GenFx.Components.Tests/TreeNodeTest.cs
/// <summary>
/// Tests that the AppendChild method works correctly.
/// </summary>
Tests that the AppendChild method works correctly.
Tests that the AppendChild method works correctly .
[Fact]
        public void TreeNode_AppendChild()
        {
            GeneticAlgorithm algorithm = GetAlgorithm();
            TestTreeEntity entity = new TestTreeEntity();
            entity.Initialize(algorithm);
            TreeNode node = new TreeNode();
            entity.SetRootNode(node);
            TreeNode child = new TreeNode();
            node.AppendChild(child);
            Assert.Same(child, node.ChildNodes[0]);
            Assert.Same(node, child.ParentNode);
            Assert.Same(entity, child.Tree);
        }
[ Fact ] public void TreeNode_AppendChild ( ) { GeneticAlgorithm algorithm = GetAlgorithm ( ) ; TestTreeEntity entity = new TestTreeEntity ( ) ; entity . Initialize ( algorithm ) ; TreeNode node = new TreeNode ( ) ; entity . SetRootNode ( node ) ; TreeNode child = new TreeNode ( ) ; node . AppendChild ( child ) ; Assert . Same ( child , node . ChildNodes [ 0 ] ) ; Assert . Same ( node , child . ParentNode ) ; Assert . Same ( entity , child . Tree ) ; }
Tests that the AppendChild method works correctly.
Tests that the AppendChild method works correctly .