aboutsummaryrefslogtreecommitdiff
path: root/test/content/mock/MockSettingRepository.ts
blob: 52427137aac3c5135762e614b7f09c44052b578f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import SettingRepository from "../../../src/content/repositories/SettingRepository";
import Settings, {
  DefaultSetting,
} from "../../../src/shared/settings/Settings";

export default class MockSettingRepository implements SettingRepository {
  private value: Settings;

  constructor(initValue: Settings = DefaultSetting) {
    this.value = initValue;
  }

  get(): Settings {
    return this.value;
  }

  set(setting: Settings): void {
    this.value = setting;
  }
}