src/GenFx.Components.Tests/TreeEntityExtensionsTest.cs
/// <summary>
/// Tests that the <see cref="TreeEntityExtensions.GetPostfixTree"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void TreeEntityExtensions_GetPostfixTree()
        {
            TestTree tree = new TestTree();
            TreeNode node1 = new TreeNode();
            tree.SetRootNode(node1);
            TreeNode node2 = new TreeNode();
            TreeNode node3 = new TreeNode();
            node1.AppendChild(node2);
            node1.AppendChild(node3);
            TreeNode node4 = new TreeNode();
            node2.AppendChild(node4);
            TreeNode node5 = new TreeNode();
            TreeNode node6 = new TreeNode();
            node3.AppendChild(node5);
            node3.AppendChild(node6);
            List<TreeNode> list = TreeEntityExtensions.GetPostfixTree(tree).ToList();
            Assert.Equal(new TreeNode[]
            {
                node4,
                node2,
                node5,
                node6,
                node3,
                node1
            }, list);
        }
[ Fact ] public void TreeEntityExtensions_GetPostfixTree ( ) { TestTree tree = new TestTree ( ) ; TreeNode node1 = new TreeNode ( ) ; tree . SetRootNode ( node1 ) ; TreeNode node2 = new TreeNode ( ) ; TreeNode node3 = new TreeNode ( ) ; node1 . AppendChild ( node2 ) ; node1 . AppendChild ( node3 ) ; TreeNode node4 = new TreeNode ( ) ; node2 . AppendChild ( node4 ) ; TreeNode node5 = new TreeNode ( ) ; TreeNode node6 = new TreeNode ( ) ; node3 . AppendChild ( node5 ) ; node3 . AppendChild ( node6 ) ; List < TreeNode > list = TreeEntityExtensions . GetPostfixTree ( tree ) . ToList ( ) ; Assert . Equal ( new TreeNode [ ] { node4 , node2 , node5 , node6 , node3 , node1 } , list ) ; }
Tests that the  method works correctly.
Tests that the method works correctly .