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);
            }
        }
示例#5
0
 public DbAbstractionTestPaging()
 {
     this.client = DbAbstractionTestContainer.INSTANCE.GetInstance <IDbQueryBase>();
 }
示例#6
0
 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);
 }
示例#8
0
 public DBUser(IDbQueryBase dbBase)
 {
     this.dbBase = dbBase;
 }
示例#9
0
 public SQLitePaginationFactory(IDbQueryBase dbBase)
 {
     this.dbBase = dbBase;
 }
示例#10
0
 public DbAbstractionTestPaging(BootstrapFixture bootstrap)
 {
     this.client = bootstrap.GetInstance <IDbQueryBase>();
 }