mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Move legacy tree from vs to sql (#20622)
* Move legacy tree from vs to sql * fix tests * exemption * Fix lint
This commit is contained in:
@@ -115,6 +115,7 @@ suite('ConnectionDialogService tests', () => {
|
||||
mockConnectionManagementService.setup(x => x.getConnectionGroups(TypeMoq.It.isAny())).returns(() => {
|
||||
return [new ConnectionProfileGroup('test_group', undefined, 'test_group')];
|
||||
});
|
||||
mockConnectionManagementService.setup(x => x.getConnectionIconId(TypeMoq.It.isAnyString())).returns(() => '');
|
||||
mockConnectionManagementService.setup(x => x.getProviderProperties(TypeMoq.It.isAny())).returns(() => {
|
||||
return <ConnectionProviderProperties>{
|
||||
connectionStringOptions: {
|
||||
@@ -177,6 +178,7 @@ suite('ConnectionDialogService tests', () => {
|
||||
mockConnectionManagementService.setup(x => x.addSavedPassword(TypeMoq.It.isAny())).returns(() => {
|
||||
return Promise.resolve(connectionProfile);
|
||||
});
|
||||
mockConnectionManagementService.setup(x => x.isConnected(undefined, TypeMoq.It.isAny())).returns(() => true);
|
||||
mockWidget = TypeMoq.Mock.ofType(ConnectionWidget, TypeMoq.MockBehavior.Strict, [], undefined, 'MSSQL', undefined, undefined, mockConnectionManagementService.object);
|
||||
mockWidget.setup(x => x.focusOnOpen());
|
||||
mockWidget.setup(x => x.handleOnConnecting());
|
||||
|
||||
@@ -18,7 +18,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
|
||||
import { entries } from 'sql/base/common/collections';
|
||||
import { TestLayoutService, workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
import { INewConnectionParams, ConnectionType, RunQueryOnConnectionMode } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { INewConnectionParams, ConnectionType, RunQueryOnConnectionMode, IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { NullAdsTelemetryService } from 'sql/platform/telemetry/common/adsTelemetryService';
|
||||
import { createConnectionProfile } from 'sql/workbench/services/connection/test/browser/connectionManagementService.test';
|
||||
import { TestConfigurationService } from 'sql/platform/connection/test/common/testConfigurationService';
|
||||
@@ -63,6 +63,10 @@ suite('ConnectionDialogWidget tests', () => {
|
||||
undefined, // telemetry service
|
||||
undefined, // configuration service
|
||||
new TestCapabilitiesService());
|
||||
mockConnectionManagementService.setup(x => x.isConnected(undefined, TypeMoq.It.isAny())).returns(() => true);
|
||||
mockConnectionManagementService.setup(x => x.getConnectionIconId(TypeMoq.It.isAnyString())).returns(() => '');
|
||||
mockConnectionManagementService.setup(x => x.getProviderProperties(TypeMoq.It.isAnyString())).returns(() => undefined);
|
||||
cmInstantiationService.stub(IConnectionManagementService, mockConnectionManagementService.object);
|
||||
let providerDisplayNames = ['Mock SQL Server'];
|
||||
let providerNameToDisplayMap = { 'MSSQL': 'Mock SQL Server' };
|
||||
connectionDialogWidget = new TestConnectionDialogWidget(providerDisplayNames, providerNameToDisplayMap['MSSQL'], providerNameToDisplayMap, cmInstantiationService, mockConnectionManagementService.object, undefined, undefined, viewDescriptorService, new TestThemeService(), new TestLayoutService(), new NullAdsTelemetryService(), new MockContextKeyService(), undefined, new NullLogService(), new TestTextResourcePropertiesService(new TestConfigurationService()), new TestConfigurationService(), new TestCapabilitiesService());
|
||||
|
||||
Reference in New Issue
Block a user