Fix new editor windows to open with global connection (#8901)

* Fix new editor windows to open with global connection

* Fix test

* Fix tests

* Move logic to queryInputFactory

* Remove unused function

* Remove unneeded check

* Add tests
This commit is contained in:
Charles Gagnon
2020-01-17 07:44:28 -08:00
committed by GitHub
parent 9acd757f6a
commit d517cf0c8c
3 changed files with 137 additions and 4 deletions

View File

@@ -8,10 +8,13 @@ import { IQueryModelService } from 'sql/platform/query/common/queryModel';
import { TestQueryModelService } from 'sql/platform/query/test/common/testQueryModelService';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { TestConnectionManagementService } from 'sql/platform/connection/test/common/testConnectionManagementService';
import { TestObjectExplorerService } from 'sql/workbench/services/objectExplorer/test/browser/testObjectExplorerService';
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
export function workbenchInstantiationService(): ITestInstantiationService {
const instantiationService = vsworkbenchInstantiationService();
instantiationService.stub(IConnectionManagementService, new TestConnectionManagementService());
instantiationService.stub(IQueryModelService, new TestQueryModelService());
instantiationService.stub(IObjectExplorerService, new TestObjectExplorerService());
return instantiationService;
}