Пример #1
0
        public void NewSagaIsMarkedAsSuch()
        {
            var saga = new SmallestSagaOnEarthCorrelatedOnInitialMessage();

            activator.UseHandler(saga);
            dispatcher.Dispatch(new SomeMessageWithANumber(1));
            saga.IsNew.ShouldBe(true);
        }
Пример #2
0
        public void SagaInitiatedTwiceIsNotMarkedAsNewTheSecondTime()
        {
            var saga = new SmallestSagaOnEarthCorrelatedOnInitialMessage();

            activator.UseHandler(saga);
            dispatcher.Dispatch(new SomeMessageWithANumber(1));
            dispatcher.Dispatch(new SomeMessageWithANumber(1));
            saga.IsNew.ShouldBe(false);
        }