示例#1
0
        public void ExecuteDecimal2()
        {
            var obj = new CreditMarketDataEntry_Decimal {
                EntryPrice = 123.45M
            };
            var clone = Serializer.DeepClone(obj);

            Assert.AreEqual(123.45M, clone.EntryPrice);
        }
示例#2
0
        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");
            });
        }
示例#3
0
 public void ExecuteDecimal2()
 {
     var obj = new CreditMarketDataEntry_Decimal { EntryPrice = 123.45M };
     var clone = Serializer.DeepClone(obj);
     Assert.AreEqual(123.45M, clone.EntryPrice);
 }