mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-01 17:40:30 -04:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -81,9 +81,9 @@ function createInstantiationService(addAccountFailureEmitter?: Emitter<string>):
|
||||
|
||||
// Create a mocked out instantiation service
|
||||
let instantiationService = TypeMoq.Mock.ofType(InstantiationService, TypeMoq.MockBehavior.Strict);
|
||||
instantiationService.setup(x => x.createInstance<AccountViewModel>(TypeMoq.It.isValue(AccountViewModel)))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(AccountViewModel)))
|
||||
.returns(() => mockAccountViewModel.object);
|
||||
instantiationService.setup(x => x.createInstance<AccountListRenderer>(TypeMoq.It.isValue(AccountListRenderer)))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(AccountListRenderer)))
|
||||
.returns(() => undefined);
|
||||
|
||||
// Create a mock account dialog
|
||||
@@ -97,7 +97,7 @@ function createInstantiationService(addAccountFailureEmitter?: Emitter<string>):
|
||||
.returns(() => undefined);
|
||||
mockAccountDialog.setup(x => x.open())
|
||||
.returns(() => undefined);
|
||||
instantiationService.setup(x => x.createInstance<AccountDialog>(TypeMoq.It.isValue(AccountDialog)))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(AccountDialog)))
|
||||
.returns(() => mockAccountDialog.object);
|
||||
|
||||
return instantiationService.object;
|
||||
|
||||
@@ -94,7 +94,7 @@ function createInstantiationService(): InstantiationService {
|
||||
|
||||
// Create a mocked out instantiation service
|
||||
let instantiationService = TypeMoq.Mock.ofType(InstantiationService, TypeMoq.MockBehavior.Strict);
|
||||
instantiationService.setup(x => x.createInstance<AccountPickerViewModel>(TypeMoq.It.isValue(AccountPickerViewModel), TypeMoq.It.isAny()))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(AccountPickerViewModel), TypeMoq.It.isAny()))
|
||||
.returns(() => mockAccountViewModel.object);
|
||||
|
||||
// Create a mock account picker
|
||||
@@ -113,7 +113,7 @@ function createInstantiationService(): InstantiationService {
|
||||
.returns((container) => undefined);
|
||||
mockAccountDialog.setup(x => x.createAccountPickerComponent());
|
||||
|
||||
instantiationService.setup(x => x.createInstance<AccountPicker>(TypeMoq.It.isValue(AccountPicker), TypeMoq.It.isAny()))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(AccountPicker), TypeMoq.It.isAny()))
|
||||
.returns(() => mockAccountDialog.object);
|
||||
|
||||
return instantiationService.object;
|
||||
|
||||
@@ -52,7 +52,7 @@ suite('auto OAuth dialog controller tests', () => {
|
||||
|
||||
// Create a mocked out instantiation service
|
||||
instantiationService = TypeMoq.Mock.ofType(InstantiationService, TypeMoq.MockBehavior.Strict);
|
||||
instantiationService.setup(x => x.createInstance<AutoOAuthDialog>(TypeMoq.It.isValue(AutoOAuthDialog)))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(AutoOAuthDialog)))
|
||||
.returns(() => mockAutoOAuthDialog.object);
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ suite('Firewall rule dialog controller tests', () => {
|
||||
|
||||
// Create a mocked out instantiation service
|
||||
instantiationService = TypeMoq.Mock.ofType(InstantiationService, TypeMoq.MockBehavior.Strict);
|
||||
instantiationService.setup(x => x.createInstance<FirewallRuleViewModel>(TypeMoq.It.isValue(FirewallRuleViewModel)))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(FirewallRuleViewModel)))
|
||||
.returns(() => mockFirewallRuleViewModel.object);
|
||||
|
||||
// Create a mock account picker
|
||||
@@ -73,7 +73,7 @@ suite('Firewall rule dialog controller tests', () => {
|
||||
mockFirewallRuleDialog.setup(x => x.open());
|
||||
mockFirewallRuleDialog.setup(x => x.close());
|
||||
|
||||
instantiationService.setup(x => x.createInstance<FirewallRuleDialog>(TypeMoq.It.isValue(FirewallRuleDialog)))
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(FirewallRuleDialog)))
|
||||
.returns(() => mockFirewallRuleDialog.object);
|
||||
|
||||
connectionProfile = {
|
||||
|
||||
@@ -10,7 +10,7 @@ import data = require('data');
|
||||
import { Builder, $ } from 'vs/base/browser/builder';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as assert from 'assert';
|
||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { ServiceOptionType, ServiceOptionTypeNames } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
suite('Advanced options helper tests', () => {
|
||||
var possibleInputs: string[];
|
||||
@@ -41,7 +41,7 @@ suite('Advanced options helper tests', () => {
|
||||
],
|
||||
defaultValue: null,
|
||||
isRequired: false,
|
||||
valueType: ServiceOptionType.category,
|
||||
valueType: <any>ServiceOptionTypeNames.category,
|
||||
objectType: undefined,
|
||||
isArray: undefined
|
||||
};
|
||||
@@ -54,7 +54,7 @@ suite('Advanced options helper tests', () => {
|
||||
categoryValues: null,
|
||||
defaultValue: null,
|
||||
isRequired: false,
|
||||
valueType: ServiceOptionType.boolean,
|
||||
valueType: <any>ServiceOptionTypeNames.boolean,
|
||||
objectType: undefined,
|
||||
isArray: undefined
|
||||
};
|
||||
@@ -67,7 +67,7 @@ suite('Advanced options helper tests', () => {
|
||||
categoryValues: null,
|
||||
defaultValue: '15',
|
||||
isRequired: false,
|
||||
valueType: ServiceOptionType.number,
|
||||
valueType: <any>ServiceOptionTypeNames.number,
|
||||
objectType: undefined,
|
||||
isArray: undefined
|
||||
};
|
||||
@@ -80,7 +80,7 @@ suite('Advanced options helper tests', () => {
|
||||
categoryValues: null,
|
||||
defaultValue: null,
|
||||
isRequired: false,
|
||||
valueType: ServiceOptionType.string,
|
||||
valueType: <any>ServiceOptionTypeNames.string,
|
||||
objectType: undefined,
|
||||
isArray: undefined
|
||||
};
|
||||
@@ -93,7 +93,7 @@ suite('Advanced options helper tests', () => {
|
||||
categoryValues: null,
|
||||
defaultValue: null,
|
||||
isRequired: false,
|
||||
valueType: ServiceOptionType.string,
|
||||
valueType: <any>ServiceOptionTypeNames.string,
|
||||
objectType: undefined,
|
||||
isArray: undefined
|
||||
};
|
||||
|
||||
@@ -130,7 +130,7 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
|
||||
// Setup configuration to return a config that can be modified later.
|
||||
workspaceConfigurationServiceMock = TypeMoq.Mock.ofType(WorkspaceConfigurationTestService);
|
||||
workspaceConfigurationServiceMock.setup(x => x.getConfiguration(Constants.sqlConfigSectionName))
|
||||
workspaceConfigurationServiceMock.setup(x => x.getValue(Constants.sqlConfigSectionName))
|
||||
.returns(() => configResult);
|
||||
|
||||
connectionManagementService = createConnectionManagementService();
|
||||
|
||||
@@ -168,7 +168,6 @@ suite('SQL ConnectionProfileInfo tests', () => {
|
||||
let savedProfile = storedProfile;
|
||||
let connectionProfile = ConnectionProfile.createFromStoredProfile(savedProfile, msSQLCapabilities);
|
||||
assert.equal(savedProfile.groupId, connectionProfile.groupId);
|
||||
assert.deepEqual(savedProfile.options, connectionProfile.options);
|
||||
assert.deepEqual(savedProfile.providerName, connectionProfile.providerName);
|
||||
assert.deepEqual(savedProfile.savePassword, connectionProfile.savePassword);
|
||||
assert.deepEqual(savedProfile.id, connectionProfile.id);
|
||||
@@ -178,7 +177,6 @@ suite('SQL ConnectionProfileInfo tests', () => {
|
||||
let savedProfile = Object.assign({}, storedProfile, { id: undefined });
|
||||
let connectionProfile = ConnectionProfile.createFromStoredProfile(savedProfile, msSQLCapabilities);
|
||||
assert.equal(savedProfile.groupId, connectionProfile.groupId);
|
||||
assert.deepEqual(savedProfile.options, connectionProfile.options);
|
||||
assert.deepEqual(savedProfile.providerName, connectionProfile.providerName);
|
||||
assert.equal(savedProfile.savePassword, connectionProfile.savePassword);
|
||||
assert.notEqual(connectionProfile.id, undefined);
|
||||
|
||||
@@ -85,7 +85,7 @@ suite('SQL ConnectionStore tests', () => {
|
||||
configResult[Constants.configMaxRecentConnections] = maxRecent;
|
||||
|
||||
workspaceConfigurationServiceMock = TypeMoq.Mock.ofType(WorkspaceConfigurationTestService);
|
||||
workspaceConfigurationServiceMock.setup(x => x.getConfiguration(Constants.sqlConfigSectionName))
|
||||
workspaceConfigurationServiceMock.setup(x => x.getValue(Constants.sqlConfigSectionName))
|
||||
.returns(() => configResult);
|
||||
|
||||
storageServiceMock = TypeMoq.Mock.ofType(StorageTestService);
|
||||
|
||||
@@ -13,7 +13,7 @@ import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
|
||||
|
||||
import { IDbColumn, BatchSummary, QueryExecuteSubsetResult, ResultSetSubset } from 'data';
|
||||
import { EventEmitter } from 'vs/base/common/eventEmitter';
|
||||
import { EventEmitter } from 'sql/base/common/eventEmitter';
|
||||
import { equal } from 'assert';
|
||||
import { Mock, MockBehavior, It } from 'typemoq';
|
||||
|
||||
@@ -35,7 +35,7 @@ suite('Insights Dialog Controller Tests', () => {
|
||||
let { runner, complete } = getPrimedQueryRunner(testData, testColumns);
|
||||
|
||||
let instMoq = Mock.ofType(InstantiationService, MockBehavior.Strict);
|
||||
instMoq.setup(x => x.createInstance<QueryRunner>(It.isValue(QueryRunner), It.isAny(), undefined))
|
||||
instMoq.setup(x => x.createInstance(It.isValue(QueryRunner), It.isAny(), undefined))
|
||||
.returns(() => runner);
|
||||
|
||||
let connMoq = Mock.ofType(ConnectionManagementService, MockBehavior.Strict, {}, {});
|
||||
|
||||
Reference in New Issue
Block a user