public void DeepCopy_Throws_Ex_When_Copy_Instance_Of_Non_Serializable_Type_And_Errors_Disabled() { var nonSerializableInstance = new CustomNonSerializableType(); object result = null; Assert.DoesNotThrow(() => result = nonSerializableInstance.DeepCopy(false)); Assert.Null(result); }
public void DeepCopyThrowWhenCopyInstanceOfNonSerializableTypeAndErrorsDisabled() { var nonSerializableInstance = new CustomNonSerializableType(); object result = null; Assert.DoesNotThrow(() => result = nonSerializableInstance.DeepCopy(false)); Assert.IsNull(result); }
public void DeepCopy_Throws_Ex_When_Copy_Instance_Of_NonSerializable_Type() { var nonSerializableInstance = new CustomNonSerializableType(); Assert.Throws<SerializationException>(() => nonSerializableInstance.DeepCopy(true)); }
public void DeepCopyThrowWhenCopyInstanceOfNonSerializableType() { var nonSerializableInstance = new CustomNonSerializableType(); Assert.Throws <SerializationException>(() => nonSerializableInstance.DeepCopy(true)); }