public async Task ThenHandleActionCallsTheHandlerWithoutAPolicy() { var messages = _fixture.CreateMany <StreamMessage>().ToList(); var token = new CancellationToken(); await _sut.HandleAsync(messages, Mock.Of <IStreamGapStrategy>(), token); _handlerWithoutPolicy.VerifyExecuted(messages, _numberOfExpectedAttempts); }
public async Task ThenHandleActionCallsTheHandlerWithoutAPolicyForEachAttempt() { try { await Act(); } catch (DoNotRetryException) { } _handlerWithoutPolicy.VerifyExecuted(_messages, _numberOfExpectedAttempts); }
public async Task ThenHandleActionCallsTheHandlerWithoutAPolicyForTheNumberOfRetriesPlusTheInitialAttempt() { try { await Act(); } catch (RetryException) { } _handlerWithoutPolicy.VerifyExecuted(_messages, _numberOfExpectedAttempts); }
public async Task ThenHandleActionCallsTheHandlerWithoutAPolicy() { try { await Act(); } catch (DoNotRetryException) { } _handlerWithoutPolicy.VerifyExecuted(_messages, Times.Once()); }
public void ThenHandleActionCallsTheHandlerWithoutAPolicyForTheNumberOfRetriesPlusTheInitialAttempt() { _handlerWithoutPolicy.VerifyExecuted(_messages, _numberOfExpectedAttempts); }