public SagaStorageTests()
 {
     _host = Substitute.For <IConfigureHost>();
     _cfg  = new StoragesConfiguration(_host, Setup.GetConnection());
     _cfg.EnableSagaStorage(ifExists: TableExistsAction.DropIt);
     _sut = new SagaStorage(Setup.GetConnection());
 }
 public SagaStorageTests()
 {
     _host = Substitute.For<IConfigureHost>();
     _cfg = new StoragesConfiguration(_host, Setup.GetConnection());
     _cfg.EnableSagaStorage(ifExists: TableExistsAction.DropIt);
     _sut = new SagaStorage(Setup.GetConnection());
 }
Example #3
0
        public BaseSagaTests()
        {
            // LogManager.OutputToTrace();
            _invoker = Substitute.For <IHandlerTypeInvoker>();
            _di      = Substitute.For <IContainerScope>();
            _bus     = Substitute.For <IDispatchMessages>();
            _handler = new Handler(_bus);
            _storage = Substitute.For <IStoreSagaState>();
            _saga    = new MySagaState();

            this.Setup();
        }
Example #4
0
        public BaseSagaTests()
        {
            LogManager.OutputToTrace();
            _invoker = Substitute.For<IHandlerTypeInvoker>();
            _di = Substitute.For<IContainerScope>();
            _bus = Substitute.For<IDispatchMessages>();
            _handler = new Handler(_bus);
            _storage = Substitute.For<IStoreSagaState>();
            _saga = new MySagaState();

            this.Setup();

           
        }
Example #5
0
        private IStoreSagaState GetSagaRepository(IResolveDependencies resolver)
        {
            IStoreSagaState grepo = null;

            try
            {
                grepo = resolver.Resolve <IStoreSagaState>();
                this.LogDebug($"Using saga repository '{ grepo.GetType()}' ...");
            }
            catch (Exception ex)
            {
                throw new DiContainerException(typeof(IStoreSagaState), ex);
            }
            return(grepo);
        }
Example #6
0
 IConfigureSagas IConfigureSagas.WithSagaStorage(IStoreSagaState store)
 {
     _storages[typeof(IStoreSagaState)] = store;
     return(this);
 }