Esempio n. 1
0
 private void StartSaga(IGameMessage @event, Saga saga)
 {
     _repository.Add(saga);
     try
     {
         saga.Handle(@event);
     }
     finally
     {
         CleanUp(saga);
     }
 }
Esempio n. 2
0
        public override void Assert(IContainer container)
        {
            container.Configure(cfg =>
            {
                cfg.For <TEVENT>().Use <TEVENT>();
                cfg.For <TRESPONSE>().Use <TRESPONSE>();
            });
            _saga.Handle(container.GetInstance <TEVENT>());
            var eventAggregator = container.GetInstance <IEventAggregator>() as MockEventAggregator;

            eventAggregator.AssertMessageWasSent <TRESPONSE>();
        }