Exemplo n.º 1
0
        public void ResponseCodeIsNotConsideredTransient(HttpStatusCode code)
        {
            var strategy = new HttpStatusCodeErrorDetectionStrategy();

            Assert.False(strategy.IsTransient(new HttpRequestWithStatusException {
                StatusCode = code
            }));
        }
Exemplo n.º 2
0
        public void BadExceptionIsNotConsideredTransient()
        {
            var strategy = new HttpStatusCodeErrorDetectionStrategy();

            Assert.False(strategy.IsTransient(new InvalidOperationException()));
        }
 public RetryHandler(HttpMessageHandler innerHandler)
     : base(innerHandler)
 {
     this.errorDetectionStrategy = new HttpStatusCodeErrorDetectionStrategy();
 }