Exemple #1
0
 public void InvokeCommandAsync_requires_bus(FirstTestCommand testCommand, IDictionary <string, string> headers)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeCommandAsync(null, testCommand, headers));
 }
Exemple #2
0
        public async Task InvokeCommandAsync_forwards_to_bus(IBus bus, FirstTestCommand testCommand, IDictionary <string, string> headers)
        {
            await BusExtensions.InvokeCommandAsync(bus, testCommand, headers);

            Mock.Get(bus).Verify(p => p.InvokeCommandAsync(testCommand, It.IsAny <Guid>(), headers));
        }
Exemple #3
0
 public void InvokeCommandAsync_requires_bus(FirstTestCommand testCommand, Guid correlationId)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeCommandAsync(null, testCommand, correlationId));
 }
Exemple #4
0
        public async Task InvokeCommandAsync_forwards_to_bus(IBus bus, FirstTestCommand testCommand, Guid correlationId)
        {
            await BusExtensions.InvokeCommandAsync(bus, testCommand, correlationId);

            Mock.Get(bus).Verify(p => p.InvokeCommandAsync(testCommand, correlationId, It.IsAny <IDictionary <string, string> >()));
        }