public void Return_The_Correct_Processor_Given_Valid_Message_Property_And_Configured_ServiceProvider() { var processor = _dispatcher.GetProcessorForMessage(NewMessageWithTypeProperty(typeof(MyEvent).AssemblyQualifiedName)); processor.Should().NotBeNull(); processor.Should().BeOfType <MessageProcessor <MyEvent> >(); }
public void Return_Null_Processor_Given_ServiceProvider_Has_Not_Added_Processor_Implementation() { var dispatcher = new MessagePropertyBasedDispatcher( new NullLogger <MessagePropertyBasedDispatcher>(), new ServiceCollection().BuildServiceProvider(), // explicitly setting no DI bindings MessageTypePropertyName); var processor = dispatcher.GetProcessorForMessage(NewMessageWithTypeProperty(typeof(MyEvent).AssemblyQualifiedName)); processor.Should().BeNull(); }