ExistDatabaseWithThatName(this StringAssertions assertions, string connectionString) { var databaseName = assertions.Subject; var sqlServerCreator = new SQLServerCreator(StubConnectionStringBuilder.Create()); var isExists = sqlServerCreator.IsExists(databaseName) && !string.IsNullOrEmpty(databaseName); Execute.Assertion.ForCondition(isExists).FailWith("database does not exists"); return(new AndConstraint <StringAssertions>(assertions)); }
public void when_run_concurrency_command_should_execute_all_commands() { var connectionString = StubConnectionStringBuilder.Create(); Parallel.For(0, 20, (i) => { var sqlServerCreator = new SQLServerCreator(connectionString); var databaseName = DatabaseGenerator.NewName; sqlServerCreator.Create(databaseName); sqlServerCreator.Drop(databaseName); }); }
public SqlServerCreatorConnectWithSqlDbSandboxConnectionTest() { _database = new SQLServerCreator(new SqlServerDbSandBoxConnection(StubConnectionStringBuilder.Create())); }
public SQLServerCreatorTest() { _database = new SQLServerCreator(StubConnectionStringBuilder.Create()); }
public FluentDatabaseSandBoxTest() { _sqlServerDatabase = new SQLServerCreator(StubConnectionStringBuilder.Create()); _migrationDllPath = Directory.GetCurrentDirectory() + @"\MigratorFile\FluentMigrator.dll"; CreateFluentMigratorHandler(); }