public void GivenRetryBehaviorWhenAttemptShouldCalculateDelay( int coeficient, int initialValue, int attempt, int delay) { var behavior = new GeometricProgressionRetryBehavior(coeficient, initialValue); var timeSpan = behavior.GetWaitTime(attempt); timeSpan.Should().Be(TimeSpan.FromMinutes(delay)); }
public void GivenRetryBehaviorShouldVerifyIfCanRetry(int attempt, int maxAttempts, bool shouldRetry) { var behavior = new GeometricProgressionRetryBehavior(1, 1); behavior.ShouldRetry(attempt, maxAttempts).Should().Be(shouldRetry); }