Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public void InvokeManyCommandsAsync_requires_bus(FirstTestCommand[] testCommands, Guid correlationId, IDictionary <string, string> headers)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeManyCommandsAsync(null, testCommands, correlationId, headers));
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public void InvokeManyCommandsAsync_requires_bus(FirstTestCommand[] testCommands)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeManyCommandsAsync(null, testCommands));
 }