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

@@ -7,7 +7,7 @@ import * as TypeMoq from 'typemoq';
import * as assert from 'assert';
import { AddCellAction, ClearAllOutputsAction, CollapseCellsAction, TrustedAction, RunAllCellsAction, NewNotebookAction } from 'sql/workbench/contrib/notebook/browser/notebookActions';
import { CellType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellType } from 'sql/workbench/services/notebook/common/contracts';
import { INotebookEditor } from 'sql/workbench/services/notebook/browser/notebookService';
import { ICellModel, INotebookModel } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { INotificationService } from 'vs/platform/notification/common/notification';

View File

@@ -10,7 +10,7 @@ import * as assert from 'assert';
import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/testCapabilitiesService';
import { ConnectionManagementService } from 'sql/workbench/services/connection/browser/connectionManagementService';
import { CellModel } from 'sql/workbench/contrib/notebook/browser/models/cell';
import { CellTypes, NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellTypes, NotebookChangeType } from 'sql/workbench/services/notebook/common/contracts';
import { ModelFactory } from 'sql/workbench/contrib/notebook/browser/models/modelFactory';
import { INotebookModelOptions, NotebookContentChange, ICellModel } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { NotebookEditorModel } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
@@ -36,6 +36,8 @@ import { INotebookEditor, INotebookManager } from 'sql/workbench/services/notebo
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import { startsWith } from 'vs/base/common/strings';
import { assign } from 'vs/base/common/objects';
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { IStorageService } from 'vs/platform/storage/common/storage';
class ServiceAccessor {
@@ -68,7 +70,17 @@ suite('Notebook Editor Model', function (): void {
const notificationService = TypeMoq.Mock.ofType(TestNotificationService, TypeMoq.MockBehavior.Loose);
let memento = TypeMoq.Mock.ofType(Memento, TypeMoq.MockBehavior.Loose, '');
memento.setup(x => x.getMemento(TypeMoq.It.isAny())).returns(() => void 0);
const queryConnectionService = TypeMoq.Mock.ofType(ConnectionManagementService, TypeMoq.MockBehavior.Loose, memento.object, undefined, new TestStorageService());
let testinstantiationService = new TestInstantiationService();
testinstantiationService.stub(IStorageService, new TestStorageService());
const queryConnectionService = TypeMoq.Mock.ofType(ConnectionManagementService, TypeMoq.MockBehavior.Loose,
undefined, // connection store
undefined, // connection status manager
undefined, // connection dialog service
testinstantiationService, // instantiation service
undefined, // editor service
undefined, // telemetry service
undefined, // configuration service
new TestCapabilitiesService());
queryConnectionService.callBase = true;
const capabilitiesService = TypeMoq.Mock.ofType(TestCapabilitiesService);
const configurationService = new TestConfigurationService();