public async void Should_have_a_subscription_for_the_first_saga_message() { Guid sagaId = NewId.NextGuid(); var message = new FirstSagaMessage { CorrelationId = sagaId }; await InputQueueSendEndpoint.Send(message); Guid?foundId = await GetSagaRepository <SimpleSaga>().ShouldContainSaga(message.CorrelationId, TestTimeout); foundId.HasValue.ShouldBe(true); }
public async Task Should_have_a_subscription_for_the_second_saga_message() { Guid sagaId = NewId.NextGuid(); var message = new FirstSagaMessage { CorrelationId = sagaId }; await InputQueueSendEndpoint.Send(message); Guid?foundId = await GetSagaRepository <SimpleSaga>().ShouldContainSaga(message.CorrelationId, TestTimeout); foundId.HasValue.ShouldBe(true); var nextMessage = new SecondSagaMessage { CorrelationId = sagaId }; await InputQueueSendEndpoint.Send(nextMessage); foundId = await GetSagaRepository <SimpleSaga>().ShouldContainSaga(x => x.CorrelationId == sagaId && x.Second.IsCompleted, TestTimeout); foundId.HasValue.ShouldBe(true); }