提交 1fbd298c 编写于 作者: B Benjamin Pasero

fix tests

上级 99304344
......@@ -19,7 +19,7 @@ import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/un
import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel';
import { HotExitConfiguration } from 'vs/platform/files/common/files';
import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace';
class ServiceAccessor {
constructor(
......@@ -380,7 +380,7 @@ suite('Files - TextFileService', () => {
service.onConfigurationChange({ files: { hotExit: setting } });
// Set empty workspace if required
if (!workspace) {
accessor.contextService.setWorkspace(null);
accessor.contextService.setWorkspace(new Workspace('empty:1508317022751'));
}
// Set multiple windows if required
if (multipleWindows) {
......
......@@ -102,12 +102,14 @@ export class TestContextService implements IWorkspaceContextService {
}
public getWorkbenchState(): WorkbenchState {
if (this.workspace) {
if (this.workspace.configuration) {
return WorkbenchState.WORKSPACE;
}
if (this.workspace.folders.length) {
return WorkbenchState.FOLDER;
}
return WorkbenchState.EMPTY;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册