public void HandleNotification() { _mediator .Awaiting(mediator => mediator.Publish(_notification)) .Should().NotThrow(); _handler.Verify(handler => handler.Handle(_notification, default), Times.Once); }
public void HandleNotification() { _mediator .Awaiting(mediator => mediator.Publish(_notification)) .Should().NotThrow(); foreach (var handler in _handlers) { handler.Verify(h => h.Handle(_notification, default), Times.Once); } }
public void PublishNotification() { _mediator .Awaiting(mediator => mediator.Publish(new Notification())) .Should().NotThrow(); }