summaryrefslogtreecommitdiffstats
path: root/src/test/MockSelection.ts
diff options
context:
space:
mode:
authorChristoph Schlosser <thisisagap@gmail.com>2017-12-08 17:22:57 +0100
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2017-12-16 21:48:09 +0100
commit86595e38975f902d061df4a1e60783bfb725ad2f (patch)
treed51eca8c52cba6bac8f3e1d13fcd53cee3d5d7ef /src/test/MockSelection.ts
parentab3a71d958273915512f5da948ef73c8b5ac26d8 (diff)
downloaddoxdocgen-86595e38975f902d061df4a1e60783bfb725ad2f.tar.gz
Add basic tests
Diffstat (limited to 'src/test/MockSelection.ts')
-rw-r--r--src/test/MockSelection.ts35
1 files changed, 35 insertions, 0 deletions
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.");
+ }
+}