From c523d75472a16dc58e2e4c4ee51eb15efe6c11f9 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 29 Nov 2020 13:55:26 +0900 Subject: Add operators' test --- test/content/mock/MockSettingRepository.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/content/mock/MockSettingRepository.ts (limited to 'test/content/mock/MockSettingRepository.ts') diff --git a/test/content/mock/MockSettingRepository.ts b/test/content/mock/MockSettingRepository.ts new file mode 100644 index 0000000..5242713 --- /dev/null +++ b/test/content/mock/MockSettingRepository.ts @@ -0,0 +1,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; + } +} -- cgit v1.2.3