public void CloneClassWithNonSerializedIllegalField() { Assert.IsTrue(Cloneable <ClassWithNonSerializedIllegalField> .CanClone()); Assert.IsTrue(Cloneable <ClassWithNonSerializedIllegalField> .CanShallowClone()); var source = new ClassWithNonSerializedIllegalField { Name = "John Doe" }; var clone = Cloneable <ClassWithNonSerializedIllegalField> .Clone(source); Assert.IsNotNull(clone); clone = null; clone = Cloneable <ClassWithNonSerializedIllegalField> .ShallowClone(source); Assert.IsNotNull(clone); }
public void CloneClassWithNonSerializedIllegalField() { Assert.IsTrue(Cloneable<ClassWithNonSerializedIllegalField>.CanClone()); Assert.IsTrue(Cloneable<ClassWithNonSerializedIllegalField>.CanShallowClone()); var source = new ClassWithNonSerializedIllegalField { Name = "John Doe" }; var clone = Cloneable<ClassWithNonSerializedIllegalField>.Clone(source); Assert.IsNotNull(clone); clone = null; clone = Cloneable<ClassWithNonSerializedIllegalField>.ShallowClone(source); Assert.IsNotNull(clone); }