public async Task ThenTheEventIsReceivedByTheSubscriberQueueDerp() { var id = Guid.NewGuid(); var expectedEvents = ExpectEvents .Create() .OfType <TestEventV1>(x => x.Id == id); var message = new TestEventV1 { Id = id }; await AzureServiceBusBootstrap.Bus.PublishAsync(message); Assert.That(expectedEvents.AreReceived); }
public async Task Subject() { var id = Guid.NewGuid(); var expectedEvents = ExpectEvents .Create() .OfType <TestCommandV1>(x => x.Id == id); var command = new TestCommandV1 { Id = id }; await AzureServiceBusBootstrap.Bus.SendAsync <TestQueue>(command); Assert.That(expectedEvents.AreReceived); }
public async Task ThenTheEventIsReceivedByAllSubscriberQueuesDerp() { var id = Guid.NewGuid(); var expectedEvents = ExpectEvents .Create() .OfType <MultipleSubscribersEventV1>(x => x.Id == id && x.ReceivedCount == 1) .OfType <MultipleSubscribersEventV1>(x => x.Id == id && x.ReceivedCount == 2); var message = new MultipleSubscribersEventV1 { Id = id }; await AzureServiceBusBootstrap.Bus.PublishAsync(message); Assert.That(expectedEvents.AreReceived); }
public async Task Subject() { var id = Guid.NewGuid(); var expectedEvents = ExpectEvents .Create() .OfType <FailTwiceV1>(x => x.Id == id && x.DeliveryAttempt == 1) .OfType <FailTwiceV1>(x => x.Id == id && x.DeliveryAttempt == 2) .OfType <FailTwiceV1>(x => x.Id == id && x.DeliveryAttempt == 3); var command = new FailTwiceV1 { Id = id }; await AzureServiceBusBootstrap.Bus.SendAsync <TestQueue>(command); Assert.That(expectedEvents.AreReceived); }