Update server tree action contributions (#15525)

* Update server tree action contributions

* Fix test
This commit is contained in:
Charles Gagnon
2021-05-20 12:41:56 -07:00
committed by GitHub
parent c61c53976a
commit 2ec720d5b9
19 changed files with 176 additions and 213 deletions

View File

@@ -22,6 +22,7 @@ import { createObjectExplorerServiceMock } from 'sql/workbench/services/objectEx
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { TestTree } from 'sql/workbench/test/treeMock';
import { TestConnectionManagementService } from 'sql/platform/connection/test/common/testConnectionManagementService';
import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService';
const connection: azdata.IConnectionProfile = {
options: [],
@@ -64,7 +65,7 @@ suite('Scripting Actions', () => {
instantiationService = new InstantiationService(collection);
const capabilitiesService = new TestCapabilitiesService();
const connectionManagementServiceMock = TypeMoq.Mock.ofType(TestConnectionManagementService, TypeMoq.MockBehavior.Loose);
const serverTreeViewMock = TypeMoq.Mock.ofType(ServerTreeView, TypeMoq.MockBehavior.Loose, connectionManagementServiceMock.object, instantiationService, undefined, undefined, undefined, undefined, capabilitiesService);
const serverTreeViewMock = TypeMoq.Mock.ofType(ServerTreeView, TypeMoq.MockBehavior.Loose, connectionManagementServiceMock.object, instantiationService, undefined, undefined, undefined, undefined, capabilitiesService, undefined, undefined, new MockContextKeyService());
treeMock = TypeMoq.Mock.ofType(TestTree);
serverTreeViewMock.setup(x => x.tree).returns(() => treeMock.object);
collection.set(IObjectExplorerService, createObjectExplorerServiceMock({ serverTreeView: serverTreeViewMock.object, treeNode: treeNode }));