コード例 #1
0
            public void ReturnsFalseIfResponseStatusBelow500OrWhitelisted(Exception e, HttpStatusCode status)
            {
                var response = new HttpResponseMessage(status);
                var result   = RetryWithExponentialBackoff.IsTransientError(e, response);

                Assert.False(result);
            }
コード例 #2
0
            public void ReturnsFalseIfNotCorrectExceptionType()
            {
                var e      = new Exception();
                var result = RetryWithExponentialBackoff.IsTransientError(e, null);

                Assert.False(result);
            }
コード例 #3
0
            public void ReturnsTrueIfResponseStatusAbove500(Exception e, HttpStatusCode status)
            {
                var response = new HttpResponseMessage(status);
                var result   = RetryWithExponentialBackoff.IsTransientError(e, response);

                Assert.True(result);
            }
コード例 #4
0
            public void ReturnsTrueIfResponseNull(Exception e)
            {
                var result = RetryWithExponentialBackoff.IsTransientError(e, null);

                Assert.True(result);
            }