Beispiel #1
0
        public void Should_activate_all_actors()
        {
            sut.Connect();

            A.CallTo(() => actor1.Activate(consumer1))
            .MustHaveHappened();

            A.CallTo(() => actor2.Activate(consumer2))
            .MustHaveHappened();
        }
Beispiel #2
0
        public void Should_not_subscribe_to_event_store_when_stopped_in_db()
        {
            state = state.Stopped();

            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();
        }