Exemplo n.º 1
0
 public void RaiseEventAsync_requires_bus(FirstTestEvent testEvent, IDictionary <string, string> headers)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseEventAsync(null, testEvent, headers));
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 public void RaiseEventAsync_requires_bus(FirstTestEvent testEvent, Guid correlationId)
 {
     Assert.ThrowsAsync <ArgumentNullException>(() => BusExtensions.RaiseEventAsync(null, testEvent, correlationId));
 }
Exemplo n.º 4
0
        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> >()));
        }