提交 7ba372c8 编写于 作者: R Rob Lourens

Fix tests

上级 f23e47b9
......@@ -17,6 +17,10 @@ import { isWindows } from 'vs/base/common/platform';
import { TestContextService } from 'vs/workbench/test/common/workbenchTestServices';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
import { FileService } from 'vs/platform/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity';
import { UriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentityService';
suite('Search - Viewlet', () => {
let instantiation: TestInstantiationService;
......@@ -25,6 +29,7 @@ suite('Search - Viewlet', () => {
instantiation = new TestInstantiationService();
instantiation.stub(IModelService, stubModelService(instantiation));
instantiation.set(IWorkspaceContextService, new TestContextService(TestWorkspace));
instantiation.stub(IUriIdentityService, new UriIdentityService(new FileService(new NullLogService())));
});
test('Data Source', function () {
......
......@@ -21,6 +21,10 @@ import { SearchModel } from 'vs/workbench/contrib/search/common/searchModel';
import * as process from 'vs/base/common/process';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
import { FileService } from 'vs/platform/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity';
import { UriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentityService';
const nullEvent = new class {
id: number = -1;
......@@ -72,6 +76,7 @@ suite('SearchModel', () => {
instantiationService.stub(IModelService, stubModelService(instantiationService));
instantiationService.stub(ISearchService, {});
instantiationService.stub(ISearchService, 'textSearch', Promise.resolve({ results: [] }));
instantiationService.stub(IUriIdentityService, new UriIdentityService(new FileService(new NullLogService())));
const config = new TestConfigurationService();
config.setUserConfiguration('search', { searchOnType: true });
......
......@@ -18,6 +18,10 @@ import { IModelService } from 'vs/editor/common/services/modelService';
import { IReplaceService } from 'vs/workbench/contrib/search/common/replace';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity';
import { UriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentityService';
import { FileService } from 'vs/platform/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
const lineOneRange = new OneLineRange(1, 0, 1);
......@@ -29,6 +33,7 @@ suite('SearchResult', () => {
instantiationService = new TestInstantiationService();
instantiationService.stub(ITelemetryService, NullTelemetryService);
instantiationService.stub(IModelService, stubModelService(instantiationService));
instantiationService.stub(IUriIdentityService, new UriIdentityService(new FileService(new NullLogService())));
instantiationService.stubPromise(IReplaceService, {});
instantiationService.stubPromise(IReplaceService, 'replace', null);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册