public void ConstructorThrowsExceptionWhenNeitherCacheIsEnabled() { ICacheImplementation a = new AspDotNetDataCacheImplementation(Key.KeyCreator); a.IsEnabled = false; ICacheImplementation b = new MemcachedCacheImplementation(Key.KeyCreator); b.IsEnabled = false; var l = new List<ICacheImplementation>() { a, b }; //assert Assert.Throws(typeof(ArgumentException), () => new CacheImplementationSelector(l, (ExampleCachingStrategy.SelectCacheImplementation))); }
public void TearDown() { //asp.net cache does not have a clearall method, so use the one on //the asp.net cacheimplementation, not nice, but works. ICacheImplementation a = new AspDotNetDataCacheImplementation(Key.KeyCreator); a.RemoveAll(); //empty memcached DistCache.RemoveAll(); }
public void Setup() { ICacheImplementation a = new AspDotNetDataCacheImplementation(Key.KeyCreator); a.RemoveAll(); _stubKeyCreator = MockRepository.GenerateStub<ICacheKeyCreator>(); _c = new AspDotNetDataCacheImplementation(_stubKeyCreator); _oneHour = new TimeSpan(1,0,0); }
public void Setup() { ICacheImplementation a = new AspDotNetDataCacheImplementation(Key.KeyCreator); a.RemoveAll(); _stubKeyCreator = MockRepository.GenerateStub<ICacheKeyCreator>(); _c = new AspDotNetDataCacheImplementation(_stubKeyCreator); _tomorrow = 1.Day().Hence(); _oneHour = 1.Hour(); _testString = "test"; }