public void modest_constructor_sets_Interval_correctly() { var fixture = new Fixture(); var interval = fixture.Create<TimeSpan>(); var sut = new ConstantRetryIntervalStrategy(interval); sut.Interval.Should().Be(interval); }
public void constructor_sets_ImmediateFirstRetry_correctly(bool immediateFirstRetry) { var fixture = new Fixture(); var interval = fixture.Create<TimeSpan>(); var sut = new ConstantRetryIntervalStrategy(interval, immediateFirstRetry); sut.ImmediateFirstRetry.Should().Be(immediateFirstRetry); }
public void GetIntervalFromZeroBasedTick_returns_Interval_always(bool zeroRetried) { var fixture = new Fixture(); var interval = fixture.Create<TimeSpan>(); var sut = new ConstantRetryIntervalStrategy(interval, immediateFirstRetry: false); int retried = zeroRetried ? 0 : fixture.Create<int>(); TimeSpan actual = sut.GetInterval(retried); actual.Should().Be(interval); }
public void modest_constructor_sets_ImmediateFirstRetry_to_false() { var sut = new ConstantRetryIntervalStrategy(TimeSpan.Zero); sut.ImmediateFirstRetry.Should().BeFalse(); }