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")); }
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()); }
public void Portal_AttributeCachePortalGroup_Exception() { var id = 999; var test = TestCachedGroupInfo.GetCacheTestInfo(id); }