/// <summary> /// Constructor /// </summary> /// <param name="dep">Dependency represented by this instance</param> /// <param name="isCached">Cache settings for the dependency</param> public HealthCheck(Dependency dep, CacheSettings cacheSettings) { attachedDependency = dep; cache = cacheSettings; cacheSettings.Validate(); cacheManager = InMemoryCache.GetInstance; }
public void CachingDisabledNegativeCacheEnabled() { CacheSettings settings = new CacheSettings() { Cache = false, NegativeCache = true, CacheTTLSeconds = 60, Name = "ABC" }; Assert.Throws(typeof(InvalidOperationException), () => settings.Validate()); Assert.Throws(typeof(InvalidOperationException), () => new CertificateCache(settings)); }