コード例 #1
0
        public void Portal_AttributeCachePortalGroup()
        {
            Csla.ApplicationContext.ClientContext.Add(CacheDataPortal.CacheGroup, "group");
            var id   = 999;
            var test = TestCachedGroupInfo.GetCacheTestInfo(id);

            Assert.AreEqual(id, test.ID);
            Assert.IsTrue(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedGroupInfo).FullName)).Any());
            Assert.IsTrue(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedGroupInfo).FullName)).Single().Key.Contains("group"));
        }
コード例 #2
0
        public void Portal_DeleteRemovesCachedItems_GroupWithoutGrouping()
        {
            Csla.ApplicationContext.ClientContext.Add(CacheDataPortal.CacheGroup, "group");
            var id   = 999;
            var test = TestCachedGroupInfo.GetCacheTestInfo(id);

            Assert.AreEqual(id, test.ID);
            Assert.IsTrue(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedGroupInfo).FullName)).Any());
            Assert.IsTrue(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedGroupInfo).FullName)).Single().Key.Contains("group"));
            Csla.ApplicationContext.ClientContext.Remove(CacheDataPortal.CacheGroup);
            TestGroupEdit.DeleteTestGroupEdit(id);
            Assert.IsFalse(InMemoryCacheProvider.cache.Where(c => c.Key.StartsWith(typeof(TestCachedGroupInfo).FullName)).Any());
        }
コード例 #3
0
 public void Portal_AttributeCachePortalGroup_Exception()
 {
     var id   = 999;
     var test = TestCachedGroupInfo.GetCacheTestInfo(id);
 }