public void When_attempting_to_register_a_null_reference_as_command_handler_then_an_argument_null_exception_is_thrown() { var sut = new ConnectedProjectionsCommandBus(); Action act = () => sut.Register(null); act.Should().Throw <ArgumentNullException>(); }
public CommandBusTests() { _fixture = new Fixture() .CustomizeConnectedProjectionNames() .CustomizeConnectedProjectionCommands(); _commandHandlerMock = new Mock <IConnectedProjectionsCommandHandler>(); var commandBus = new ConnectedProjectionsCommandBus(); commandBus.Register(_commandHandlerMock.Object); _sut = commandBus; }