Beispiel #1
0
        public void ShouldReturnTrueValidateMirrorImageTree()
        {
            var rootNode            = TreeTestData.GetComplexTreeRootNode();
            var mirrorImageRootNode = TreeTestData.GetRootNodeOfComplexTreeMirror();
            var MirrorImageTree     = new MirrorImageOfTree();
            var isValid             = MirrorImageTree.Validate(rootNode, mirrorImageRootNode);

            Assert.IsTrue(isValid);
        }
Beispiel #2
0
        public void ShouldReturnRootOfMirrorImageTree()
        {
            var rootNode                 = TreeTestData.GetComplexTreeRootNode();
            var expectedRootTree         = TreeTestData.GetRootNodeOfComplexTreeMirror();
            var MirrorImageTree          = new MirrorImageOfTree();
            var actualRoot               = MirrorImageTree.Create(rootNode);
            var structuralIdentification = new StructuralIdentification();
            var isIdentical              = structuralIdentification.ValidateWithValue(rootNode, expectedRootTree);

            Assert.IsTrue(isIdentical);
        }