示例#1
0
        public void ShouldReturnTrueIfTwoTreeStructuresAreSame()
        {
            TreeDSNode rootNodeOfFirstTree            = TreeTestData.GetComplexTreeRootNode();
            TreeDSNode rootNodeOfSecondTree           = TreeTestData.GetRootNodeOfComplexTreeWithHighervalue();
            var        structuralIdentification       = new StructuralIdentification();
            var        structuralIdentificationResult = structuralIdentification.Validate(rootNodeOfFirstTree, rootNodeOfSecondTree);

            Assert.AreEqual(true, structuralIdentificationResult);
        }
示例#2
0
        public void ShouldReturnFalseIfTwoTreeStructuresAreNotIdentical()
        {
            TreeDSNode rootNodeOfFirstTree            = TreeTestData.GetComplexTreeRootNode();
            TreeDSNode rootNodeOfSecondTree           = TreeTestData.GetLeftSplayTreeRootNode();
            var        structuralIdentification       = new StructuralIdentification();
            var        structuralIdentificationResult = structuralIdentification.Validate(rootNodeOfFirstTree, rootNodeOfSecondTree);

            Assert.AreEqual(false, structuralIdentificationResult);
        }