public void ExecuteDouble2() { var obj = new CreditMarketDataEntry_Double { EntryPrice = 123.45 }; var clone = Serializer.DeepClone(obj); Assert.AreEqual(123.45, clone.EntryPrice); }
public void ExecuteDouble2() { Program.ExpectFailure <Exception>(() => { var obj = new CreditMarketDataEntry_Double { EntryPrice = 123.45 }; var clone = Serializer.DeepClone(obj); Assert.AreEqual(123.45, clone.EntryPrice); }, ex => { if (ex is InvalidOperationException && ex.InnerException != null) { ex = ex.InnerException; } return(ex is NotSupportedException && ex.Message == "IExtensible is not supported in structs or classes with inheritance"); }); }