public void CachingVerifyDisabledNullCacheSettings() { var policyIndex = new CertPolicyIndexStub(); var policyExpression = new KeyUsageExtensionField(false); var emailAddress = new MailAddress(Email); policyIndex.Add(emailAddress.Host, policyExpression); var resolver = new PolicyResolver(policyIndex, null); var source = resolver.GetIncomingPolicy(emailAddress); Assert.Null(resolver.Cache); Assert.True(source.Count > 0); }
private PolicyResolver CreateResolver(CacheSettings cacheSettings) { var policyIndex = new CertPolicyIndexStub(); var policyExpression = new KeyUsageExtensionField(false); var emailAddress = new MailAddress(Email); policyIndex.Add(emailAddress.Host, policyExpression); return(new PolicyResolver( policyIndex, new CacheSettings() { Name = cacheSettings.Name ?? TestCacheName, Cache = cacheSettings.Cache, NegativeCache = cacheSettings.NegativeCache, CacheTTLSeconds = cacheSettings.CacheTTLSeconds })); }