public void NextIntervalCalculator_does_not_overflow() { // setup var c = new Retry.NextIntervalCalculator(); // execute var nextInterval = c.GetNextInterval(1.5f, TimeSpan.FromTicks(long.MaxValue)); // verify nextInterval.Should().Be(TimeSpan.FromTicks(long.MaxValue)); }
public void NextIntervalCalculator_calculates_next_interval_correctly() { // setup var c = new Retry.NextIntervalCalculator(); // execute var nextInterval = c.GetNextInterval(2f, TimeSpan.FromTicks(1000)); // verify nextInterval.Should().Be(TimeSpan.FromTicks(2000)); }