public void RaiseEventAsync_requires_bus(FirstTestEvent testEvent, IDictionary <string, string> headers) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseEventAsync(null, testEvent, headers)); }
public async Task RaiseEventAsync_forwards_to_bus(IBus bus, FirstTestEvent testEvent, IDictionary <string, string> headers) { await BusExtensions.RaiseEventAsync(bus, testEvent, headers); Mock.Get(bus).Verify(p => p.RaiseEventAsync(testEvent, It.IsAny <Guid>(), headers)); }
public void RaiseEventAsync_requires_bus(FirstTestEvent testEvent, Guid correlationId) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseEventAsync(null, testEvent, correlationId)); }
public async Task RaiseEventAsync_forwards_to_bus(IBus bus, FirstTestEvent testEvent, Guid correlationId) { await BusExtensions.RaiseEventAsync(bus, testEvent, correlationId); Mock.Get(bus).Verify(p => p.RaiseEventAsync(testEvent, correlationId, It.IsAny <IDictionary <string, string> >())); }