public async Task Should_reopen_subscription_when_exception_is_retrieved() { await OnErrorAsync(eventSubscription, new InvalidOperationException()); await Task.Delay(200); await sut.StopAsync(); A.CallTo(() => eventSubscription.StopAsync()) .MustHaveHappened(Repeated.Exactly.Twice); A.CallTo(() => eventStore.CreateSubscription(A <IEventSubscriber> .Ignored, A <string> .Ignored, A <string> .Ignored)) .MustHaveHappened(Repeated.Exactly.Twice); A.CallTo(() => eventSubscriber.OnErrorAsync(A <IEventSubscription> .Ignored, A <Exception> .Ignored)) .MustNotHaveHappened(); }
public async Task Should_subscribe_after_constructor() { await sut.StopAsync(); A.CallTo(() => eventStore.CreateSubscription(sut, streamFilter, null)) .MustHaveHappened(); }