src/GenFx.Components.Tests/TreeHelperTest.cs
/// <summary>
/// Tests that the <see cref="TreeHelper.SetTreeForChildNodes"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void TreeHelper_SetTreeForChildNodes()
        {
            TreeNode root = new TreeNode();
            TreeNode node1 = new TreeNode();
            TreeNode node2 = new TreeNode();
            TreeNode node3 = new TreeNode();
            TreeNode node4 = new TreeNode();
            root.ChildNodes.Add(node1);
            root.ChildNodes.Add(node2);
            node1.ChildNodes.Add(node3);
            node2.ChildNodes.Add(node4);
            TestTree tree = new TestTree();
            root.Tree = tree;
            TreeHelper.SetTreeForChildNodes(root);
            Assert.Same(tree, root.Tree);
            Assert.Same(tree, node1.Tree);
            Assert.Same(tree, node2.Tree);
            Assert.Same(tree, node3.Tree);
            Assert.Same(tree, node4.Tree);
        }
[ Fact ] public void TreeHelper_SetTreeForChildNodes ( ) { TreeNode root = new TreeNode ( ) ; TreeNode node1 = new TreeNode ( ) ; TreeNode node2 = new TreeNode ( ) ; TreeNode node3 = new TreeNode ( ) ; TreeNode node4 = new TreeNode ( ) ; root . ChildNodes . Add ( node1 ) ; root . ChildNodes . Add ( node2 ) ; node1 . ChildNodes . Add ( node3 ) ; node2 . ChildNodes . Add ( node4 ) ; TestTree tree = new TestTree ( ) ; root . Tree = tree ; TreeHelper . SetTreeForChildNodes ( root ) ; Assert . Same ( tree , root . Tree ) ; Assert . Same ( tree , node1 . Tree ) ; Assert . Same ( tree , node2 . Tree ) ; Assert . Same ( tree , node3 . Tree ) ; Assert . Same ( tree , node4 . Tree ) ; }
Tests that the  method works correctly.
Tests that the method works correctly .