Add more notebook extension tests (#11143)

* more tests

* More tests

* More tests

* Add prompt tests
This commit is contained in:
Chris LaFreniere
2020-06-30 11:01:51 -07:00
committed by GitHub
parent a32f42d475
commit a8a7559229
18 changed files with 295 additions and 101 deletions

View File

@@ -12,19 +12,10 @@ import { NotebookUtils } from './notebookUtils';
*/
export class AppContext {
private serviceMap: Map<string, any> = new Map();
public readonly notebookUtils: NotebookUtils;
constructor(public readonly extensionContext: vscode.ExtensionContext, public readonly apiWrapper: ApiWrapper) {
this.apiWrapper = apiWrapper || new ApiWrapper();
this.notebookUtils = new NotebookUtils(apiWrapper);
}
public getService<T>(serviceName: string): T {
return this.serviceMap.get(serviceName) as T;
}
public registerService<T>(serviceName: string, service: T): void {
this.serviceMap.set(serviceName, service);
}
}