mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-31 01:25:38 -05:00
Removing ApiWrapper and adding sinon (#11340)
* Added sinon removed api wrapper removed unnecesaary utils * merged from testfix * merged from aasim/import/downloadTestFix * merge from aasim/import/downloadTestFix
This commit is contained in:
@@ -11,22 +11,18 @@ import { FlatFileWizard } from '../wizard/flatFileWizard';
|
||||
import { ServiceClient } from '../services/serviceClient';
|
||||
import { ApiType, managerInstance } from '../services/serviceApiManager';
|
||||
import { FlatFileProvider } from '../services/contracts';
|
||||
import { ApiWrapper } from '../common/apiWrapper';
|
||||
|
||||
/**
|
||||
* The main controller class that initializes the extension
|
||||
*/
|
||||
export default class MainController extends ControllerBase {
|
||||
private _outputChannel: vscode.OutputChannel;
|
||||
private _apiWrapper: ApiWrapper;
|
||||
|
||||
public constructor(
|
||||
context: vscode.ExtensionContext,
|
||||
apiWrapper: ApiWrapper
|
||||
) {
|
||||
super(context);
|
||||
this._apiWrapper = apiWrapper;
|
||||
this._outputChannel = this._apiWrapper.createOutputChannel(constants.serviceName);
|
||||
this._outputChannel = vscode.window.createOutputChannel(constants.serviceName);
|
||||
}
|
||||
/**
|
||||
*/
|
||||
@@ -39,13 +35,13 @@ export default class MainController extends ControllerBase {
|
||||
this.initializeFlatFileProvider(provider);
|
||||
resolve(true);
|
||||
});
|
||||
await new ServiceClient(this._outputChannel, this._apiWrapper).startService(this._context);
|
||||
await new ServiceClient(this._outputChannel).startService(this._context);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
private initializeFlatFileProvider(provider: FlatFileProvider) {
|
||||
this._apiWrapper.registerTask(constants.flatFileImportStartCommand, (profile: azdata.IConnectionProfile, ...args: any[]) => new FlatFileWizard(provider, this._apiWrapper).start(profile, args));
|
||||
azdata.tasks.registerTask(constants.flatFileImportStartCommand, (profile: azdata.IConnectionProfile, ...args: any[]) => new FlatFileWizard(provider).start(profile, args));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user