Path: blob/main/src/vs/workbench/contrib/debug/test/browser/mockDebugModel.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { DisposableStore } from '../../../../../base/common/lifecycle.js';6import { NullLogService } from '../../../../../platform/log/common/log.js';7import { UriIdentityService } from '../../../../../platform/uriIdentity/common/uriIdentityService.js';8import { DebugModel } from '../../common/debugModel.js';9import { MockDebugStorage } from '../common/mockDebug.js';10import { TestFileService } from '../../../../test/browser/workbenchTestServices.js';11import { TestStorageService } from '../../../../test/common/workbenchTestServices.js';1213const fileService = new TestFileService();14export const mockUriIdentityService = new UriIdentityService(fileService);1516export function createMockDebugModel(disposable: Pick<DisposableStore, 'add'>): DebugModel {17const storage = disposable.add(new TestStorageService());18const debugStorage = disposable.add(new MockDebugStorage(storage));19return disposable.add(new DebugModel(debugStorage, <any>{ isDirty: (e: any) => false }, mockUriIdentityService, new NullLogService()));20}212223