public async Task InvokeManyCommandsAsync_forwards_all_to_bus(IBus bus, FirstTestCommand[] testCommands) { await BusExtensions.InvokeManyCommandsAsync(bus, testCommands); Mock.Get(bus).Verify(p => p.InvokeCommandAsync(It.IsAny <FirstTestCommand>(), It.IsAny <Guid>(), It.IsAny <IDictionary <string, string> >()), Times.Exactly(testCommands.Length)); }
public void InvokeManyCommandsAsync_requires_bus(FirstTestCommand[] testCommands, Guid correlationId, IDictionary <string, string> headers) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeManyCommandsAsync(null, testCommands, correlationId, headers)); }
public async Task InvokeManyCommandsAsync_handles_null_command_list(IBus bus, Guid correlationId, IDictionary <string, string> headers) { await BusExtensions.InvokeManyCommandsAsync <FirstTestCommand>(bus, null, correlationId, headers); Mock.Get(bus).Verify(p => p.InvokeCommandAsync(It.IsAny <FirstTestCommand>(), It.IsAny <Guid>(), It.IsAny <IDictionary <string, string> >()), Times.Never); }
public void InvokeManyCommandsAsync_requires_bus(FirstTestCommand[] testCommands) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeManyCommandsAsync(null, testCommands)); }