Ejemplo n.º 1
0
        public void ShouldReturnFalseValidateMirrorImageTree()
        {
            var rootNode            = TreeTestData.GetComplexTreeRootNode();
            var mirrorImageRootNode = TreeTestData.GetComplexTreeRootNode();
            var MirrorImageTree     = new MirrorImageOfTree();
            var isValid             = MirrorImageTree.Validate(rootNode, mirrorImageRootNode);

            Assert.IsFalse(isValid);
        }
Ejemplo n.º 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);
        }