public async Task Process_CompletesNotification( ReceivedNotificationStub notification, NotificationHandlerStub[] handlers, ReceivedNotificationProcessor processor) { processor.RegisterHandlers(handlers); await ProcessNotifications(notification, processor); Assert.True(notification.IsCompleted); }
public async Task Process_WhenHandlerFailes_RetriesNotification( ReceivedNotificationStub notification, NotificationHandlerStub handler, ReceivedNotificationProcessor processor) { processor.RegisterHandlers(handler.YieldArray()); await ProcessNotifications(notification, processor); Assert.True(notification.IsRetried); }
public async Task Process_SendsNotificationToHandlers( ReceivedNotificationStub notification, NotificationHandlerStub[] handlers, ReceivedNotificationProcessor processor) { processor.RegisterHandlers(handlers); await ProcessNotifications(notification, processor); foreach (var handler in handlers) { Assert.True(handler.ReceivedNotifications.Contains(notification.Notification)); } }