public async Task RaiseManyEventsAsync_handles_null_event_list(IBus bus, Guid correlationId, IDictionary <string, string> headers) { await BusExtensions.RaiseManyEventsAsync <FirstTestEvent>(bus, null, correlationId, headers); Mock.Get(bus).Verify(p => p.RaiseEventAsync(It.IsAny <FirstTestEvent>(), It.IsAny <Guid>(), headers), Times.Never); }
public void RaiseManyEventsAsync_requires_bus(FirstTestEvent[] testEvents, Guid correlationId) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseManyEventsAsync(null, testEvents, correlationId)); }
public void RaiseManyEventsAsync_requires_bus(FirstTestEvent[] testEvents, Guid correlationId, IDictionary <string, string> headers) { Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseManyEventsAsync(null, testEvents, correlationId, headers)); }
public async Task RaiseManyEventsAsync_forwards_all_to_bus(IBus bus, FirstTestEvent[] testEvents, Guid correlationId, IDictionary <string, string> headers) { await BusExtensions.RaiseManyEventsAsync(bus, testEvents, correlationId, headers); Mock.Get(bus).Verify(p => p.RaiseEventAsync(It.IsAny <FirstTestEvent>(), correlationId, headers), Times.Exactly(testEvents.Length)); }