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); }
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); }