public async Task InvokeManyCommands_CorrelationId_Bus_is_required() { var commands = fixture.CreateMany <TestCommand>().ToArray(); var correlationId = fixture.Create <Guid>(); await BusExtensions.InvokeManyCommands(null, commands, correlationId); }
public async Task InvokeManyCommands_no_exception_if_commands_is_null() { IEnumerable <TestCommand> commands = null; await BusExtensions.InvokeManyCommands(mockBus.Object, commands); mockBus.Verify(p => p.InvokeCommand(It.IsAny <TestCommand>()), Times.Never); }
public async Task InvokeManyCommands_forwards_to_IBus() { var commands = fixture.CreateMany <TestCommand>().ToArray(); await BusExtensions.InvokeManyCommands(mockBus.Object, commands); mockBus.Verify(p => p.InvokeCommand(It.IsAny <TestCommand>()), Times.Exactly(commands.Length)); }
public async Task InvokeManyCommands_CorrelationId_no_exception_if_commands_is_null() { IEnumerable <TestCommand> commands = null; var correlationId = fixture.Create <Guid>(); await BusExtensions.InvokeManyCommands(mockBus.Object, commands, correlationId); mockBus.Verify(p => p.InvokeCommand(It.IsAny <TestCommand>()), Times.Never); }
public async Task InvokeManyCommands_Bus_is_required() { var commands = fixture.CreateMany <TestCommand>().ToArray(); await BusExtensions.InvokeManyCommands(null, commands); }