예제 #1
0
        public void Execute(TypeModel model, string caption)
        {
            BinaryNode head = new BinaryNode();
            BinaryNode node = head;
            // 13 is the magic limit that triggers recursion check        
            for (int i = 0; i < 13; ++i)
            {
                node.Left = new BinaryNode();
                node = (BinaryNode)node.Left;
            }

            var clone = (Node)model.DeepClone(head);
            Assert.AreEqual(head.Count(), clone.Count(), caption);
        }
예제 #2
0
        private void ExecuteImpl(TypeModel model, string caption)
        {
            BinaryNode head = new BinaryNode();
            BinaryNode node = head;

            // 13 is the magic limit that triggers recursion check
            for (int i = 0; i < 13; ++i)
            {
                node.Left = new BinaryNode();
                node      = (BinaryNode)node.Left;
            }

            var clone = (Node)model.DeepClone(head);

            Assert.Equal(head.Count(), clone.Count()); //, caption);
        }