protected override void SetUp() { base.SetUp(); SqlTestHelper.DropAllTables(); Using(new DisposableCallback(SqlTestHelper.DropAllTables)); }
protected override void SetUp() { base.SetUp(); const string tableName = "Outbox"; SqlTestHelper.DropAllTables(); _storage = new SqlServerOutboxStorage(GetNewDbConnection, new TableName("dbo", tableName)); _storage.Initialize(); }
protected override void SetUp() { SqlTestHelper.DropAllTables(); var consoleLoggerFactory = new ConsoleLoggerFactory(false); var connectionProvider = new DbConnectionProvider(SqlTestHelper.ConnectionString, consoleLoggerFactory); var asyncTaskFactory = new TplAsyncTaskFactory(consoleLoggerFactory); _transport = new SqlServerTransport(connectionProvider, QueueName, consoleLoggerFactory, asyncTaskFactory); _transport.EnsureTableIsCreated(); Using(_transport); _transport.Initialize(); _cancellationToken = new CancellationTokenSource().Token; }
protected override void SetUp() { // start clean SqlTestHelper.DropAllTables(); // end clean Using(new DisposableCallback(SqlTestHelper.DropAllTables)); var loggerFactory = new ListLoggerFactory(); var connectionProvider = new DbConnectionProvider(SqlTestHelper.ConnectionString, loggerFactory); _subscriptionStorage = new SqlServerSubscriptionStorage(connectionProvider, "Subscriptions", isCentralized: true, loggerFactory); _subscriptionStorage.EnsureTableIsCreated(); _subscriptionStorage.Initialize(); _subscriberTransport = Using(new SqlServerTransport(connectionProvider, "subscriber", loggerFactory, new TplAsyncTaskFactory(loggerFactory), new FakeRebusTime(), new SqlServerTransportOptions(connectionProvider))); _subscriberTransport.EnsureTableIsCreated(); _subscriberTransport.Initialize(); }
protected override void SetUp() { SqlTestHelper.DropAllTables(); _activator = Using(new BuiltinHandlerActivator()); _starter = Configure.With(_activator) .Transport(t => t.UseInMemoryTransport(new InMemNetwork(), "auditing-buggerino")) .Sagas(s => s.StoreInMemory()) .Options(o => { o.EnableSagaAuditing().StoreInSqlServer(SqlTestHelper.ConnectionString, TableName); o.SetMaxParallelism(1); }) .Create(); Console.WriteLine($@"The test is now running - we have the following tables: {string.Join(Environment.NewLine, SqlTestHelper.GetTableNames())}"); }
public SqlTransportFactory() { SqlTestHelper.DropAllTables(); }
public SqlServerBusFactory() { SqlTestHelper.DropAllTables(); }
protected override void SetUp() { SqlTestHelper.DropAllTables(); }