public void ShouldUseInitialStoreWhenSettingASetting() { var innerStore = new Mock <ISettingsStore>(); var store = new InvalidatableSettingsStore(innerStore.Object, oldStore => oldStore); store.SetSetting(Namespace, SettingName, null); innerStore.Verify( s => s.SetSetting(It.IsAny <SettingsNamespace>(), It.IsAny <string>(), It.IsAny <object>()), Times.AtLeastOnce()); }
public void ShouldUseStoreFromInvalidatorAfterInvalidationWhenSettingASetting() { var innerStore = new Mock <ISettingsStore>(); var store = new InvalidatableSettingsStore(null, oldStore => innerStore.Object); store.Invalidate(); store.SetSetting(Namespace, SettingName, null); innerStore.Verify( s => s.SetSetting(It.IsAny <SettingsNamespace>(), It.IsAny <string>(), It.IsAny <object>()), Times.AtLeastOnce()); }