Esempio n. 1
0
        public void NewSagaIsMarkedAsSuch()
        {
            var saga = new SmallestSagaOnEarthCorrelatedOnInitialMessage();

            activator.UseHandler(saga);
            dispatcher.Dispatch(new SomeMessageWithANumber(1));
            saga.IsNew.ShouldBe(true);
        }
Esempio n. 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);
        }