mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-31 01:25:38 -05:00
Remove references to query model service in query code (#6513)
* remove references of query model service from query code * fix tests * clean up the code
This commit is contained in:
@@ -14,6 +14,7 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
|
||||
import { QueryInput } from 'sql/workbench/parts/query/common/queryInput';
|
||||
import { TestEditorService } from 'vs/workbench/test/workbenchTestServices';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
|
||||
suite('TaskUtilities', function () {
|
||||
test('getCurrentGlobalConnection returns the selected OE server if a server or one of its children is selected', () => {
|
||||
@@ -76,7 +77,8 @@ suite('TaskUtilities', function () {
|
||||
// Mock the workbench service to return the active tab connection
|
||||
let tabConnectionUri = 'file://test_uri';
|
||||
let editorInput = new UntitledEditorInput(URI.parse(tabConnectionUri), false, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
let queryInput = new QueryInput(undefined, editorInput, undefined, undefined, undefined, undefined, undefined);
|
||||
const instantiationService = new TestInstantiationService();
|
||||
let queryInput = new QueryInput(undefined, editorInput, undefined, undefined, undefined, instantiationService);
|
||||
mockConnectionManagementService.setup(x => x.getConnectionProfile(tabConnectionUri)).returns(() => tabProfile);
|
||||
|
||||
// If I call getCurrentGlobalConnection, it should return the expected profile from the active tab
|
||||
|
||||
Reference in New Issue
Block a user