Esempio n. 1
0
 public void SerializeDataPortalException()
 {
   var obj = new Csla.Server.DataPortalException("test message", new Exception("inner message"), null);
   var obj2 = (Csla.Server.DataPortalException)Csla.Core.ObjectCloner.Clone(obj);
   Assert.IsFalse(ReferenceEquals(obj, obj2));
   Assert.AreEqual(obj.Message, obj2.Message);
 }
Esempio n. 2
0
        public void SerializeDataPortalException()
        {
            var obj = new Csla.Server.DataPortalException("test message", new Exception("inner message"), null);
            var applicationContext = _testDIContext.CreateTestApplicationContext();
            var cloner             = new Core.ObjectCloner(applicationContext);
            var obj2 = (Csla.Server.DataPortalException)cloner.Clone(obj);

            Assert.IsFalse(ReferenceEquals(obj, obj2));
            Assert.AreEqual(obj.Message, obj2.Message);
        }