public void ClearCache_Changes_FullCachePrefix() { var repos = new InMemoryRepository <Contact>(new StandardCachingStrategy <Contact>(cacheProvider)); var fullCachePrefix = repos.CachingStrategy.FullCachePrefix; // shouldn't change if we call it again repos.CachingStrategy.FullCachePrefix.ShouldBe(fullCachePrefix); // clear out only the cache for this specific repository repos.ClearCache(); // this should have changed this time repos.CachingStrategy.FullCachePrefix.ShouldNotBe(fullCachePrefix); }
public void ClearCache_Changes_FullCachePrefix() { var repos = new InMemoryRepository<Contact>(new StandardCachingStrategy<Contact>()); var fullCachePrefix = repos.CachingStrategy.FullCachePrefix; // shouldn't change if we call it again repos.CachingStrategy.FullCachePrefix.ShouldEqual(fullCachePrefix); // clear out only the cache for this specific repository repos.ClearCache(); // this should have changed this time repos.CachingStrategy.FullCachePrefix.ShouldNotEqual(fullCachePrefix); }