More layering (#9111)

* move handling generated files to the serilization classes

* remove unneeded methods

* add more folders to strictire compile, add more strict compile options

* update ci

* wip

* add more layering and fix issues

* add more strictness

* remove unnecessary assertion

* add missing checks

* fix indentation

* wip

* remove jsdoc

* fix layering

* fix compile

* fix compile errors

* wip

* wip

* finish layering

* fix css

* more layering

* rip

* reworking results serializer

* move some files around

* move capabilities to platform wip

* implement capabilities register provider

* fix capabilities service

* fix usage of the regist4ry

* add contribution

* remove no longer good parts

* fix issues with startup

* another try

* fix startup

* fix imports

* fix tests

* fix tests

* fix more tests

* fix tests

* fix more tests

* fix broken test

* fix tabbing

* fix naming
This commit is contained in:
Anthony Dresser
2020-02-12 18:24:08 -06:00
committed by GitHub
parent fa3eaa59f5
commit 9af1f3b0eb
72 changed files with 407 additions and 475 deletions

View File

@@ -8,12 +8,13 @@ import { ServerTreeView } from 'sql/workbench/contrib/objectExplorer/browser/ser
import { ConnectionManagementService } from 'sql/workbench/services/connection/browser/connectionManagementService';
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { TestStorageService } from 'vs/workbench/test/browser/workbenchTestServices';
import * as TypeMoq from 'typemoq';
import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/testCapabilitiesService';
import { ITree } from 'vs/base/parts/tree/browser/tree';
import { TestTree } from 'sql/workbench/contrib/objectExplorer/test/browser/treeMock';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
suite('ServerTreeView onAddConnectionProfile handler tests', () => {
@@ -24,7 +25,17 @@ suite('ServerTreeView onAddConnectionProfile handler tests', () => {
setup(() => {
let instantiationService = new TestInstantiationService();
let mockConnectionManagementService = TypeMoq.Mock.ofType(ConnectionManagementService, TypeMoq.MockBehavior.Strict, {}, {}, new TestStorageService());
instantiationService.stub(IStorageService, new TestStorageService());
let mockConnectionManagementService = TypeMoq.Mock.ofType(ConnectionManagementService, TypeMoq.MockBehavior.Strict,
undefined, //connection store
undefined, // connectionstatusmanager
undefined, // connectiondialog service
instantiationService, // instantiation service
undefined, // editor service
undefined, // telemetryservice
undefined, // configuration service
new TestCapabilitiesService(), // capabilities service
);
mockConnectionManagementService.setup(x => x.getConnectionGroups()).returns(x => []);
mockConnectionManagementService.setup(x => x.hasRegisteredServers()).returns(() => true);
serverTreeView = new ServerTreeView(mockConnectionManagementService.object, instantiationService, undefined, undefined, undefined, undefined, capabilitiesService);
@@ -90,7 +101,7 @@ suite('ServerTreeView onAddConnectionProfile handler tests', () => {
});
test('The tree refreshes when new capabilities are registered', () => {
capabilitiesService.fireCapabilitiesRegistered(undefined);
capabilitiesService.fireCapabilitiesRegistered(undefined, undefined);
mockRefreshTreeMethod.verify(x => x(), TypeMoq.Times.once());
});
});