Add a few dacpac extension tests (#10322)

* add controller test

* Add a few wizard tests

* Addressing comment

* fix compile error
This commit is contained in:
Kim Santiago
2020-05-08 14:04:11 -07:00
committed by GitHub
parent 10ac5fdfab
commit ea84e60fa0
7 changed files with 126 additions and 38 deletions

View File

@@ -0,0 +1,36 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as path from 'path';
export interface TestContext {
context: vscode.ExtensionContext;
}
export function createContext(): TestContext {
let extensionPath = path.join(__dirname, '..', '..');
return {
context: {
subscriptions: [],
workspaceState: {
get: () => { return Promise.resolve(); },
update: () => { return Promise.resolve(); }
},
globalState: {
get: () => { return Promise.resolve(); },
update: () => { return Promise.resolve(); }
},
extensionPath: extensionPath,
asAbsolutePath: () => { return ''; },
storagePath: '',
globalStoragePath: '',
logPath: '',
extensionUri: vscode.Uri.parse(''),
environmentVariableCollection: undefined as any
}
};
}