Ejemplo n.º 1
0
 public CreateDatabase(
     DatabaseConfig databaseConfig,
     DatabaseDirectoryManager dbDirManager,
     params string[] scripts)
 {
     _cfg                = databaseConfig ?? throw new ArgumentNullException(nameof(databaseConfig));
     _dbDirManager       = dbDirManager ?? throw new ArgumentNullException(nameof(dbDirManager));
     _createTableScripts = scripts ?? Enumerable.Empty <string>().ToArray();
 }
Ejemplo n.º 2
0
        public TestDatabaseManager()
        {
            EnvConfig = new EnvConfig();

            var dbCfg = new DatabaseConfig(EnvConfig);

            DbContextProvider          = new DbContextProvider(dbCfg);
            CreateTableScriptsProvider = new CreateTableScriptsProvider();
            DatabaseDirectoryManager   = new DatabaseDirectoryManager(dbCfg);
            CreateDatabase             = new CreateDatabase(dbCfg, DatabaseDirectoryManager, CreateTableScriptsProvider.GetScripts());
            DropDatabase = new DropDatabase(dbCfg);
        }