public async Task TestSaveResultsToCsvTest() { TestServerType serverType = TestServerType.OnPrem; using (SelfCleaningTempFile queryTempFile = new SelfCleaningTempFile()) using (SelfCleaningTempFile outputTempFile = new SelfCleaningTempFile()) using (TestServiceDriverProvider testService = new TestServiceDriverProvider()) { const string query = Scripts.MasterBasicQuery; // Execute a query await testService.ConnectForQuery(serverType, query, queryTempFile.FilePath, SqlTestDb.MasterDatabaseName); await testService.RunQueryAndWaitToComplete(queryTempFile.FilePath, query); await testService.CalculateRunTime(() => testService.SaveAsCsv(queryTempFile.FilePath, outputTempFile.FilePath, 0, 0), true); await testService.Disconnect(queryTempFile.FilePath); } }