public void UpperBoundOfDelayIsMaxDelay()
 {
     var policy = new ErrorHandlingTransmissionPolicy();
     policy.ConsecutiveErrors = int.MaxValue;
     TimeSpan delay = policy.GetBackOffTime();
     Assert.InRange(delay, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(3600));
 }
 public void FirstErrorDelayIsSameAsSlotDelay()
 {
     var policy = new ErrorHandlingTransmissionPolicy();
     policy.ConsecutiveErrors = 1;
     TimeSpan delay = policy.GetBackOffTime();
     Assert.Equal(TimeSpan.FromSeconds(10), delay);
 }
            public void NoErrorDelayIsSameAsSlotDelay()
            {
                var      policy = new ErrorHandlingTransmissionPolicy();
                TimeSpan delay  = policy.GetBackOffTime();

                Assert.Equal(TimeSpan.FromSeconds(10), delay);
            }
            public void UpperBoundOfDelayIsMaxDelay()
            {
                var policy = new ErrorHandlingTransmissionPolicy();

                policy.ConsecutiveErrors = int.MaxValue;
                TimeSpan delay = policy.GetBackOffTime();

                Assert.InRange(delay, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(3600));
            }