public void NonSerializableObject()
 {
     Exception serialEx = null;
     try
     {
         var obj = new NonSerializableClass();
         var cache = new RedisCachingProvider();
         cache.Insert("MyItem1", obj); // silentMode=false on app.config                
     }
     catch (SerializationException ex)
     {
         serialEx = ex;
     }
     Assert.IsNotNull(serialEx);
 }
示例#2
0
        public void NonSerializableObject()
        {
            Exception serialEx = null;

            try
            {
                var obj   = new NonSerializableClass();
                var cache = new RedisCachingProvider();
                cache.Insert("MyItem1", obj); // silentMode=false on app.config
            }
            catch (SerializationException ex)
            {
                serialEx = ex;
            }
            Assert.IsNotNull(serialEx);
        }