public void Constructor_Accepts_A_Collection_Of_ICacheImplementations_And_A_CacheImplementationSelectorDelegate() { //arrange _stubICacheImplementation.IsEnabled = true; var l = new List<ICacheImplementation> { _stubICacheImplementation }; //act var s = new CacheImplementationSelector(l, _stubCacheImplementationSelectorDelegate); //assert Assert.IsNotNull(s); }
public void Setup() { (new AspDotNetDataCacheImplementation(Key.KeyCreator) as ICacheImplementation).RemoveAll(); DistCache.RemoveAll(); _c = new CacheImplementationSelector(new System.Collections.Generic.List<ICacheImplementation> { new AspDotNetDataCacheImplementation(Key.KeyCreator), new MemcachedCacheImplementation(Key.KeyCreator) }, (ExampleCachingStrategy.SelectCacheImplementation)); _longTermBoundary = ExampleCachingStrategy.LongTermBoundary; _shortTimeSpan = _longTermBoundary.Subtract(TimeSpan.FromSeconds(5)); //arbitrary choice of timespan }