示例#1
0
        public void CreatesDefaultAzureCachingPolicyFromConfiguration()
        {
            var retryPolicy   = RetryPolicyFactory.GetDefaultAzureCachingRetryPolicy();
            var retryStrategy = retryPolicy.RetryStrategy as Incremental;

            Assert.AreEqual("Default Azure Caching Retry Strategy", retryStrategy.Name);
            Assert.IsInstanceOfType(retryPolicy.ErrorDetectionStrategy, typeof(CacheTransientErrorDetectionStrategy));
            var cachePolicy1 = RetryPolicyFactory.GetRetryPolicy <CacheTransientErrorDetectionStrategy>();

            Assert.IsInstanceOfType(cachePolicy1.ErrorDetectionStrategy, typeof(CacheTransientErrorDetectionStrategy));
            Assert.IsInstanceOfType(cachePolicy1.RetryStrategy, typeof(Incremental));
        }
 protected override void Act()
 {
     this.retryPolicy = RetryPolicyFactory.GetDefaultAzureCachingRetryPolicy();
 }
示例#3
0
 public RetryPolicy GetDefaultAzureCachingRetryPolicy()
 {
     return(RetryPolicyFactory.GetDefaultAzureCachingRetryPolicy());
 }