aboutsummaryrefslogtreecommitdiff
path: root/test/content/mock/MockMarkKeyRepository.ts
blob: 12bc75c1381e7718885b5996ccb3daa4203fbbfb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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;
  }
}