public void WhenHandlerForMessageNotFound_ThenThrowException() { // Arrange var messagingCore = new MessagingCore(handlerProvider, handlerScanner); // Act, Assert Assert.ThrowsAsync <MessagingInfrastructureException>(() => messagingCore.Send(new TestMessageThird())); }
public async Task ShouldHandleMessage() { // Arrange var messagingCore = new MessagingCore(handlerProvider, handlerScanner); // Act var result = await messagingCore.Send(new TestMessageFirst()); // Assert Assert.AreEqual(200, result.Code); }