aboutsummaryrefslogtreecommitdiff
path: root/test/content/mock/MockConsoleClient.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-11 16:38:08 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-11 16:38:08 +0900
commitc6288f19d93a05f96274dd172450b8350389c39f (patch)
tree75b5a168af535aa640bc21e70281497915dade63 /test/content/mock/MockConsoleClient.ts
parentebfb172520f7077a15cd5d4e865e5d86593c55ac (diff)
Mark set/jump as a clean architecture
Diffstat (limited to 'test/content/mock/MockConsoleClient.ts')
-rw-r--r--test/content/mock/MockConsoleClient.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/content/mock/MockConsoleClient.ts b/test/content/mock/MockConsoleClient.ts
new file mode 100644
index 0000000..8de2d83
--- /dev/null
+++ b/test/content/mock/MockConsoleClient.ts
@@ -0,0 +1,26 @@
+import ConsoleClient from '../../../src/content/client/ConsoleClient';
+
+export default class MockConsoleClient implements ConsoleClient {
+ public isError: boolean;
+
+ public text: string;
+
+ constructor() {
+ this.isError = false;
+ this.text = '';
+ }
+
+ info(text: string): Promise<void> {
+ this.isError = false;
+ this.text = text;
+ return Promise.resolve();
+ }
+
+ error(text: string): Promise<void> {
+ this.isError = true;
+ this.text = text;
+ return Promise.resolve();
+ }
+}
+
+