src/GenFx.Components.Tests/BinaryTreeNodeTest.cs
/// <summary>
/// Tests that the LeftChildNode and RightChildNode properties works correctly.
/// </summary>
Tests that the LeftChildNode and RightChildNode properties works correctly.
Tests that the LeftChildNode and RightChildNode properties works correctly .
[Fact]
        public void BinaryTreeNode_LeftAndRightChildNodes()
        {
            BinaryTreeNode<int> node = new BinaryTreeNode<int>();
            BinaryTreeNode<int> leftNode = new BinaryTreeNode<int>();
            BinaryTreeNode<int> rightNode = new BinaryTreeNode<int>();
            node.LeftChildNode = leftNode;
            Assert.Same(leftNode, node.LeftChildNode);
            Assert.Same(leftNode, node.ChildNodes[0]);
            node.RightChildNode = rightNode;
            Assert.Same(rightNode, node.RightChildNode);
            Assert.Same(rightNode, node.ChildNodes[1]);
        }
[ Fact ] public void BinaryTreeNode_LeftAndRightChildNodes ( ) { BinaryTreeNode < int > node = new BinaryTreeNode < int > ( ) ; BinaryTreeNode < int > leftNode = new BinaryTreeNode < int > ( ) ; BinaryTreeNode < int > rightNode = new BinaryTreeNode < int > ( ) ; node . LeftChildNode = leftNode ; Assert . Same ( leftNode , node . LeftChildNode ) ; Assert . Same ( leftNode , node . ChildNodes [ 0 ] ) ; node . RightChildNode = rightNode ; Assert . Same ( rightNode , node . RightChildNode ) ; Assert . Same ( rightNode , node . ChildNodes [ 1 ] ) ; }
Tests that the LeftChildNode and RightChildNode properties works correctly.
Tests that the LeftChildNode and RightChildNode properties works correctly .