Пример #1
0
        public void ExecuteDouble2()
        {
            var obj = new CreditMarketDataEntry_Double {
                EntryPrice = 123.45
            };
            var clone = Serializer.DeepClone(obj);

            Assert.AreEqual(123.45, clone.EntryPrice);
        }
Пример #2
0
        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");
            });
        }
Пример #3
0
 public void ExecuteDouble2()
 {
     var obj = new CreditMarketDataEntry_Double { EntryPrice = 123.45 };
     var clone = Serializer.DeepClone(obj);
     Assert.AreEqual(123.45, clone.EntryPrice);
 }