forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelpers.ts
More file actions
24 lines (23 loc) · 1.09 KB
/
Copy pathhelpers.ts
File metadata and controls
24 lines (23 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import * as TypeMoq from 'typemoq';
import { IApplicationShell, ICommandManager } from '../../client/common/application/types';
import { IExperimentService, IPersistentStateFactory } from '../../client/common/types';
import { TensorBoardPrompt } from '../../client/tensorBoard/tensorBoardPrompt';
import { MockState } from '../interpreters/mocks';
export function createTensorBoardPromptWithMocks(): TensorBoardPrompt {
const appShell = TypeMoq.Mock.ofType<IApplicationShell>();
const commandManager = TypeMoq.Mock.ofType<ICommandManager>();
const persistentStateFactory = TypeMoq.Mock.ofType<IPersistentStateFactory>();
const expService = TypeMoq.Mock.ofType<IExperimentService>();
const persistentState = new MockState(true);
persistentStateFactory
.setup((factory) => {
factory.createWorkspacePersistentState(TypeMoq.It.isAny(), TypeMoq.It.isAny());
})
.returns(() => persistentState);
return new TensorBoardPrompt(
appShell.object,
commandManager.object,
persistentStateFactory.object,
expService.object,
);
}