Beispiel #1
0
        public void CanStoreObject()
        {
            var cacheKey = "testObject";
            var cacheObject = new BigBadObject() {ID = new Guid().ToString(), Name = "Test Object"};

            Assert.IsTrue(global::CachingDemo.Cache.Store(cacheKey, cacheObject), "Can not store an object!");

            Assert.AreEqual(cacheObject.ID, ((BigBadObject)global::CachingDemo.Cache.Get(cacheKey)).ID, "Can not get the object from the cache!");
        }
Beispiel #2
0
        public void CanStoreObject()
        {
            var cacheKey    = "testObject";
            var cacheObject = new BigBadObject()
            {
                ID = new Guid().ToString(), Name = "Test Object"
            };

            Assert.IsTrue(global::CachingDemo.Cache.Store(cacheKey, cacheObject), "Can not store an object!");

            Assert.AreEqual(cacheObject.ID, ((BigBadObject)global::CachingDemo.Cache.Get(cacheKey)).ID, "Can not get the object from the cache!");
        }