public void GetIntervalFromZeroBasedTick_return_value_does_not_exceed_MaximumInterval()
        {
            var initialInterval = TimeSpan.Zero;
            var increment       = TimeSpan.FromTicks(10);
            var maximumInterval = TimeSpan.FromTicks(19);
            var sut             = new LinearRetryIntervalStrategy(
                initialInterval, increment, maximumInterval, immediateFirstRetry: false);
            int retried = 2;

            TimeSpan actual = sut.GetInterval(retried);

            actual.Should().BeLessOrEqualTo(maximumInterval);
        }
        public void GetIntervalFromZeroBasedTick_returns_linear_growth_result()
        {
            var fixture         = new Fixture();
            var initialInterval = fixture.Create <TimeSpan>();
            var increment       = fixture.Create <TimeSpan>();
            var sut             = new LinearRetryIntervalStrategy(
                initialInterval, increment, TimeSpan.MaxValue, immediateFirstRetry: false);
            var retried = fixture.Create <int>();

            TimeSpan actual = sut.GetInterval(retried);

            actual.Ticks.Should().Be(initialInterval.Ticks + (increment.Ticks * retried));
        }