Exemple #1
0
        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);
        }
Exemple #2
0
 public void RaiseManyEventsAsync_requires_bus(FirstTestEvent[] testEvents, Guid correlationId)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseManyEventsAsync(null, testEvents, correlationId));
 }
Exemple #3
0
 public void RaiseManyEventsAsync_requires_bus(FirstTestEvent[] testEvents, Guid correlationId, IDictionary <string, string> headers)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseManyEventsAsync(null, testEvents, correlationId, headers));
 }
Exemple #4
0
        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));
        }