public void DropDatabase() { IDbQueryBase dbQueryBase = this.BuildDbQueryBase(); dbQueryBase.ExecuteNonQuery("USE [master]"); dbQueryBase.ExecuteNonQuery($"DROP DATABASE {this.dbName}"); }
public void CreateDatabase() { IDbQueryBase dbQueryBase = this.BuildDbQueryBase(); string fullSql = File.ReadAllText(scriptFilePath).Replace("@DBNAME", this.dbName); foreach (string sql in fullSql.Split(";")) { dbQueryBase.ExecuteNonQuery(sql); } }
public BootstrapFixture() { using (CreateDatabaseForTests db = new CreateDatabaseForTests("UZTEC_DB_ABSTRACTION_TEST")) { db.CreateDatabase(); } IDbQueryBase dbQueryBase = this.BuildDbQueryBase(); this.container = new DbAbstractionTestContainer(dbQueryBase); }
public BootstrapFixture() { IDbQueryBase dbQueryBase = this.BuildDbQueyBase(); this.container = new DbAbstractionTestContainer(dbQueryBase); string fullSql = File.ReadAllText(scriptFilePaht).Replace("@DBNAME", dbName); foreach (string sql in fullSql.Split(";")) { dbQueryBase.ExecuteNonQuery(sql); } }
public DbAbstractionTestPaging() { this.client = DbAbstractionTestContainer.INSTANCE.GetInstance <IDbQueryBase>(); }
public DbAbstractionTestContainer(IDbQueryBase dbQueryBase) { this.dbQueryBase = dbQueryBase; this.Initialize(); }
public CreateDatabaseForTests(DbProviderFactory dbFactory, string connectionString, DatabaseDialect databaseDialect) { this.dbConnection = new ConnectionBuilder(dbFactory, connectionString).BuildConnection(); this.dbQueryBase = this.BuildDbQueryBase(databaseDialect); }
public DBUser(IDbQueryBase dbBase) { this.dbBase = dbBase; }
public SQLitePaginationFactory(IDbQueryBase dbBase) { this.dbBase = dbBase; }
public DbAbstractionTestPaging(BootstrapFixture bootstrap) { this.client = bootstrap.GetInstance <IDbQueryBase>(); }