public void ExecuteDecimal2() { var obj = new CreditMarketDataEntry_Decimal { EntryPrice = 123.45M }; var clone = Serializer.DeepClone(obj); Assert.AreEqual(123.45M, clone.EntryPrice); }
public void ExecuteDecimal2() { Program.ExpectFailure <Exception>(() => { var obj = new CreditMarketDataEntry_Decimal { EntryPrice = 123.45M }; var clone = Serializer.DeepClone(obj); Assert.AreEqual(123.45M, 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"); }); }