/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import Severity from 'vs/base/common/severity'; import { IConfirmation, IConfirmationResult, IDialogService, IDialogOptions, IShowResult, IInputResult } from 'vs/platform/dialogs/common/dialogs'; export class TestDialogService implements IDialogService { declare readonly _serviceBrand: undefined; private confirmResult: IConfirmationResult | undefined = undefined; setConfirmResult(result: IConfirmationResult) { this.confirmResult = result; } async confirm(confirmation: IConfirmation): Promise { if (this.confirmResult) { const confirmResult = this.confirmResult; this.confirmResult = undefined; return confirmResult; } return { confirmed: false }; } async show(severity: Severity, message: string, buttons?: string[], options?: IDialogOptions): Promise { return { choice: 0 }; } async input(): Promise { { return { choice: 0, values: [] }; } } async about(): Promise { } }