Пример #1
0
        public void NotifyFail_raises_event(InMemoryBusEngine sut, EventMessage <FirstTestEvent> testMessage, EventHandler <MessageEventArgs> handler)
        {
            sut.OnMessageNotifyFail += handler;

            sut.NotifyFailAsync(testMessage);

            sut.OnMessageNotifyFail -= handler;

            Mock.Get(handler).Verify(p => p(sut, It.Is <MessageEventArgs>(m => ReferenceEquals(m.Message, testMessage))));
        }
Пример #2
0
 public void NotifyFail_returns_completed_task(InMemoryBusEngine sut, EventMessage <FirstTestEvent> testMessage)
 {
     Assert.That(sut.NotifyFailAsync(testMessage), Is.SameAs(Task.CompletedTask));
 }