Esempio n. 1
0
        public void Portal_AttributeCachePortal_Get()
        {
            var id   = 999;
            var test = TestCachedInfo.GetCacheTestInfo(id);

            Assert.AreEqual(id, test.ID);
            Assert.IsTrue(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedInfo).FullName)).Any());
        }
Esempio n. 2
0
        public void Portal_DeleteRemovesCachedItems_Global()
        {
            var id   = 999;
            var test = TestCachedInfo.GetCacheTestInfo(id);

            Assert.AreEqual(id, test.ID);
            Assert.IsTrue(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedInfo).FullName)).Any());
            TestEdit.DeleteTestEdit(id);
            Assert.IsFalse(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedInfo).FullName)).Any());
        }