From 86595e38975f902d061df4a1e60783bfb725ad2f Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Fri, 8 Dec 2017 17:22:57 +0100 Subject: Add basic tests --- src/test/MockSelection.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/test/MockSelection.ts (limited to 'src/test/MockSelection.ts') diff --git a/src/test/MockSelection.ts b/src/test/MockSelection.ts new file mode 100644 index 0000000..e72ff8b --- /dev/null +++ b/src/test/MockSelection.ts @@ -0,0 +1,35 @@ +import * as vscode from "vscode"; +import MockPosition from "./MockPosition"; + +export default class MockSelection implements vscode.Selection { + public anchor: vscode.Position; + public active: vscode.Position; + public isReversed: boolean; + public start: vscode.Position; + public end: vscode.Position; + public isEmpty: boolean; + public isSingleLine: boolean; + + public constructor(a: MockPosition) { + this.active = a; + this.start = a; + } + + public contains(positionOrRange: vscode.Range | vscode.Position): boolean { + throw new Error("Method not implemented."); + } + public isEqual(other: vscode.Range): boolean { + throw new Error("Method not implemented."); + } + public intersection(range: vscode.Range): vscode.Range { + throw new Error("Method not implemented."); + } + public union(other: vscode.Range): vscode.Range { + throw new Error("Method not implemented."); + } + public with(start?: vscode.Position, end?: vscode.Position): vscode.Range; + public with(change: { start?: vscode.Position; end?: vscode.Position; }): vscode.Range; + public with(start?: any, end?: any): any { + throw new Error("Method not implemented."); + } +} -- cgit v1.2.3