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:
Anthony Dresser
2019-08-03 01:26:58 -07:00
committed by GitHub
parent 62d2fb534d
commit 674351dc75
12 changed files with 113 additions and 201 deletions

View File

@@ -26,6 +26,9 @@ import { QueryInput, QueryEditorState } from 'sql/workbench/parts/query/common/q
import { URI } from 'vs/base/common/uri';
import { ILogService, NullLogService } from 'vs/platform/log/common/log';
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { TestEditorInput } from 'vs/workbench/services/editor/test/browser/editorGroupsService.test';
import { Schemas } from 'vs/base/common/network';
class TestParsedArgs implements ParsedArgs {
[arg: string]: any;
@@ -372,7 +375,9 @@ suite('commandLineService tests', () => {
}).verifiable(TypeMoq.Times.once());
connectionManagementService.setup(c => c.getConnectionProfileById(TypeMoq.It.isAnyString())).returns(() => originalProfile);
const configurationService = getConfigurationServiceMock(true);
const queryInput: TypeMoq.Mock<QueryInput> = TypeMoq.Mock.ofType<QueryInput>(QueryInput);
const instantiationService = new TestInstantiationService();
const fileInput = new TestEditorInput(URI.from({ scheme: Schemas.untitled }));
const queryInput: TypeMoq.Mock<QueryInput> = TypeMoq.Mock.ofType<QueryInput>(QueryInput, TypeMoq.MockBehavior.Loose, undefined, fileInput, undefined, undefined, undefined, instantiationService);
let uri = URI.file(args._[0]);
const queryState = new QueryEditorState();
queryState.connected = true;