Пример #1
0
        public void Hierarchy_with_multiple_refs_to_same_object()
        {
            var c1 = new Node { value = 11 };
            var c2 = new Node { value = 12, left=c1 };
            var p = new Node { value = 1, left = c1, right = c2 };

            var c1Tick = new Node { value = 11 };
            var c2Tick = new Node { value = 12, left=c1Tick };
            var pTick = new Node { value = 1, left = c1Tick, right = c2Tick };

            Equalidator.AreEqual(p, pTick);
        }
Пример #2
0
        public void Hierarchy()
        {
            var c1 = new Node {value = 11};
            var c2 = new Node { value = 12 };
            var p = new Node { value = 1, left=c1, right=c2 };

            var c1Tick = new Node { value = 11 };
            var c2Tick = new Node { value = 12 };
            var pTick = new Node { value = 1, left = c1Tick, right = c2Tick };

            Equalidator.AreEqual(p, pTick);
        }
Пример #3
0
        public void Network_with_circular_reference()
        {
            var c1 = new Node { value = 11 };
            var c2 = new Node { value = 12 };
            var p = new Node { value = 1, left = c1, right = c2 };
            c2.left = p;

            var c1Tick = new Node { value = 11 };
            var c2Tick = new Node { value = 12 };
            var pTick = new Node { value = 1, left = c1Tick, right = c2Tick };
            c2Tick.left = pTick;

            Equalidator.AreEqual(p, pTick);
        }