コード例 #1
0
        public void TestHttpCacheControlRefreshAttributeFactoryConstructor_WithValidType()
        {
            // arrange, act
            var httpCacheControlPolicyAttribute = new HttpCacheRefreshPolicyAttribute(typeof(CacheRefreshFactory));

            // assert
            Assert.AreEqual(CacheRefreshFactory.Interval, httpCacheControlPolicyAttribute.RefreshInterval);
        }
コード例 #2
0
        public void TestHttpCacheRefreshPolicyAttributeAppSettingConstructor_WithValidValue()
        {
            var httpCacheControlPolicyAttribute = new HttpCacheRefreshPolicyAttribute("RefreshSeconds-Valid");

            Assert.AreEqual(TimeSpan.FromSeconds(112), httpCacheControlPolicyAttribute.RefreshInterval);
        }
コード例 #3
0
 public void TestHttpCacheRefreshPolicyAttributeAppSettingConstructor_WithNonExistentValue()
 {
     var httpCacheControlPolicyAttribute = new HttpCacheRefreshPolicyAttribute("RefreshSeconds-NonExistent");
 }
コード例 #4
0
 public void TestHttpCacheRefreshPolicyAttributeAppSettingConstructor_WithInvalidValue()
 {
     var httpCacheControlPolicyAttribute = new HttpCacheRefreshPolicyAttribute("RefreshSeconds-Invalid");
 }
コード例 #5
0
 public void TestHttpCacheRefreshPolicyAttributeFactoryConstructor_WithInvalidType()
 {
     var httpCacheControlPolicyAttribute = new HttpCacheRefreshPolicyAttribute(typeof(object));
 }