Ejemplo n.º 1
0
 public SagaStorageTests()
 {
     _host = Substitute.For<IConfigureHost>();
     _cfg = new StoragesConfiguration(_host, Setup.GetConnection());
     _cfg.EnableSagaStorage(ifExists: TableExistsAction.DropIt);
     _sut = new SagaStorage(Setup.GetConnection());
 }
Ejemplo n.º 2
0
 public static IConfigureHost WithSqlStorages(this IConfigureHost host,IDbFactory connection ,Action<StoragesConfiguration> cfgAction)
 {
     cfgAction.MustNotBeNull();
     var cfg=new StoragesConfiguration(host,connection);
     cfgAction(cfg);
     return host;
 }
Ejemplo n.º 3
0
        public static IConfigureHost WithSqlStorages(this IConfigureHost host, IDbFactory connection, Action <StoragesConfiguration> cfgAction)
        {
            cfgAction.MustNotBeNull();
            var cfg = new StoragesConfiguration(host, connection);

            cfgAction(cfg);
            return(host);
        }
 public ProcessingStorageTests()
 {
     _host = Substitute.For<IConfigureHost>();
     
     _host.WithProcessingStorage(Arg.Do<IStoreUnhandledMessages>(v => _sut = v));
     _cfg =new StoragesConfiguration(_host,Setup.GetConnection());
     _cfg.EnableProcessorStorage(ifExists: TableExistsAction.DropIt);
     
 }
        public ReserveIdStorageTests()
        {
            _host = Substitute.For<IConfigureHost>();

            _host.WithReserveIdStorage(Arg.Do<IStoreReservedMessagesIds>(v => _sut = v));
            _cfg = new StoragesConfiguration(_host, Setup.GetConnection());
            _cfg.EnableReserveIdStorage(ifExists: TableExistsAction.DropIt);

            _src=new ReservedIdsSource()
            {
                Count = 2,
                HandlerType = GetType(),
                MessageId = Guid.Empty
            };
        }