public void ClonePerformsADeepCopy(bool useGenericClonable) { Dictionary<string, object> dict = new Dictionary<string, object>(); JobData jobData = new JobData(dict); JobData clone = useGenericClonable ? jobData.Clone() : (JobData) ((ICloneable) jobData).Clone(); Assert.AreNotSame(jobData, clone); Assert.AreNotSame(dict, clone.State); JobAssert.AreEqual(jobData, clone); }
public void ClonePerformsADeepCopy(bool useGenericClonable) { Dictionary <string, object> dict = new Dictionary <string, object>(); JobData jobData = new JobData(dict); JobData clone = useGenericClonable ? jobData.Clone() : (JobData)((ICloneable)jobData).Clone(); Assert.AreNotSame(jobData, clone); Assert.AreNotSame(dict, clone.State); JobAssert.AreEqual(jobData, clone); }