public void Clone() { StringStack clone = (StringStack)_stack.Clone(); Assert.AreEqual(_stack.Count, clone.Count); int count = _stack.Count; for (int i = 0; i < count; i++) { CloneableType x = _stack.Pop(), y = clone.Pop(); Assert.AreEqual(x, y); Assert.AreSame(x, y); } }