public async Task When_discard_action_returned_should_discard_message() { var recoverabilityExecutor = CreateExecutor( RetryPolicy.Discard("not needed anymore")); var errorContext = CreateErrorContext(messageId: "message-id"); var result = await recoverabilityExecutor.Invoke(errorContext); Assert.AreEqual(ErrorHandleResult.Handled, result); Assert.AreEqual(0, eventAggregator.NotificationsRaised.Count); }
public async Task When_discard_action_returned_should_discard_message() { var recoverabilityExecutor = CreateExecutor( RetryPolicy.Discard("not needed anymore")); var errorContext = CreateErrorContext(messageId: "message-id"); var result = await recoverabilityExecutor.Invoke(errorContext, default); Assert.AreEqual(ErrorHandleResult.Handled, result); Assert.IsEmpty(messageRetriedNotifications); Assert.IsEmpty(messageFaultedNotifications); }