public void OneTimeSetup() { var generalSqlRepository = new GeneralSqlRepository(); var connectionFatory = TestUtilities.GetIntegrationConnectionFactory(); this.dbccRepository = new DbccRepository(connectionFatory, generalSqlRepository); }
public async Task OneTimeSetup() { var generalSqlRepository = new GeneralSqlRepository(); this.dbccRepository = new DbccRepository(ConnectionFactorySetup.ConnectionFactory, generalSqlRepository); this.startDbccRun = DateTime.UtcNow; await this.dbccRepository.RunDbcc(); this.endDbccRun = DateTime.UtcNow; // Get the database name for queries (note: with localdb unit platform test implementation the database name probably has a random suffix) using (var connection = ConnectionFactorySetup.ConnectionFactory.GetEddsPerformanceConnection()) { this.databaseName = new SqlConnectionStringBuilder(connection.ConnectionString).InitialCatalog; } }
public async Task OneTimeSetup() { var generalSqlRepository = new GeneralSqlRepository(); this.backupRepository = new BackupRepository(ConnectionFactorySetup.ConnectionFactory, generalSqlRepository); // Run full and diff backups await this.backupRepository.RunBackupAsync(BackupType.Full, Path.GetTempFileName()); await this.backupRepository.RunBackupAsync(BackupType.Differential, Path.GetTempFileName()); // Get the database name for queries (note: with localdb unit platform test implementation the database name probably has a random suffix) using (var connection = ConnectionFactorySetup.ConnectionFactory.GetEddsPerformanceConnection()) { this.databaseName = new SqlConnectionStringBuilder(connection.ConnectionString).InitialCatalog; } }