public void Should_activate_all_actors() { sut.Run(); A.CallTo(() => actor1.Activate(consumer1)) .MustHaveHappened(); A.CallTo(() => actor2.Activate(consumer2)) .MustHaveHappened(); }
public void Should_not_subscribe_to_event_store_when_stopped_in_db() { state = state.Stopped(); sut.ActivateAsync(consumerName, store).Wait(); sut.Activate(eventConsumer); sut.Dispose(); state.ShouldBeEquivalentTo(new EventConsumerState { IsStopped = true, Position = initialPosition, Error = null }); A.CallTo(() => eventStore.CreateSubscription(A <IEventSubscriber> .Ignored, A <string> .Ignored, A <string> .Ignored)) .MustNotHaveHappened(); }