private void Execute() { var cache = new BlendedCache(_contextCacheMock, _volatileCacheMock, _longTermCacheMock, _configurationMock); cache.SetService<IContextCacheLookup>(_contextCacheLookupMock); cache.SetService<IVolatileCacheLookup>(_volatileCacheLookupMock); cache.SetService<ILongTermCacheLookup>(_longTermCacheLookupMock); cache.SetService<ICacheKeyConverter>(_cacheKeyConverterMock); var cacheItemMetricLookup = RMM.GenerateStrictMock<ICachedItemMetricsLookup>(); RME.Stub(cacheItemMetricLookup, x => x.GetOrCreateCacheItemMetric<TDataMock, string>(_fixedUpCacheKey, _lookupKey)).Return(_cacheItemMetrics); cache.SetService<ICachedItemMetricsLookup>(cacheItemMetricLookup); cache.SetService<ICacheSetter>(_cacheSetterMock); if(_flushMode.HasValue) cache.SetFlushMode(_flushMode.Value); _response = cache.Get<TDataMock>(_lookupKey); }
private void Execute() { var cached = new BlendedCache(_contextCacheMock, _volatileCacheMock, _longTermCacheMock, _configurationMock); cached.SetService<ICacheSetter>(_setterMock); _blendedCache = cached; _blendedCache.Set(_lookupKey, _cachedItem); }