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