public void InvokeCommandAsync_requires_bus(FirstTestCommand testCommand, IDictionary <string, string> headers) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeCommandAsync(null, testCommand, headers)); }
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)); }
public void InvokeCommandAsync_requires_bus(FirstTestCommand testCommand, Guid correlationId) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.InvokeCommandAsync(null, testCommand, correlationId)); }
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> >())); }