diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-11-29 13:55:26 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-12-09 23:09:34 +0900 |
commit | c523d75472a16dc58e2e4c4ee51eb15efe6c11f9 (patch) | |
tree | 3aa8f0c1175280d85a959585f2b0b66fecb17808 /test/content/mock/MockMarkKeyRepository.ts | |
parent | 36c28a538955c0cd9d94c210372337d7a5c2a01b (diff) |
Add operators' test
Diffstat (limited to 'test/content/mock/MockMarkKeyRepository.ts')
-rw-r--r-- | test/content/mock/MockMarkKeyRepository.ts | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/content/mock/MockMarkKeyRepository.ts b/test/content/mock/MockMarkKeyRepository.ts new file mode 100644 index 0000000..12bc75c --- /dev/null +++ b/test/content/mock/MockMarkKeyRepository.ts @@ -0,0 +1,43 @@ +import MarkKeyRepository from "../../../src/content/repositories/MarkKeyRepository"; + +export default class MockMarkKeyRepository implements MarkKeyRepository { + public jumpMode: boolean; + public setMode: boolean; + + constructor( + initialValue: { + jumpMode: boolean; + setMode: boolean; + } = { + jumpMode: false, + setMode: false, + } + ) { + this.jumpMode = initialValue.jumpMode; + this.setMode = initialValue.setMode; + } + + disabeJumpMode(): void { + this.jumpMode = false; + } + + disabeSetMode(): void { + this.setMode = false; + } + + enableJumpMode(): void { + this.jumpMode = true; + } + + enableSetMode(): void { + this.setMode = true; + } + + isJumpMode(): boolean { + return this.jumpMode; + } + + isSetMode(): boolean { + return this.setMode; + } +} |