public void ShouldSetValueUsingSettingsStoreAccessor() { _accessor.Setup(o => o.SetSetting(It.IsAny <object>(), It.IsAny <SettingsNamespace>(), It.IsAny <string>(), It.IsAny <object>())); var _adapter = new SettingAdapter(_accessor.Object, null, new SettingsNamespace("Namespace"), "Setting"); _adapter.SetValue(null); _accessor.VerifyAll(); }
public void ShouldPassSettingNameKeyWhenSettingValue() { var settingName = "Setting"; _accessor.Setup(o => o.SetSetting(It.IsAny <object>(), It.IsAny <SettingsNamespace>(), settingName, It.IsAny <object>())); var _adapter = new SettingAdapter(_accessor.Object, null, new SettingsNamespace("Namespace"), settingName); _adapter.SetValue(null); _accessor.VerifyAll(); }
public void ShouldPassNamespaceKeyWhenSettingValue() { var @namespace = new SettingsNamespace("Namespace"); _accessor.Setup(o => o.SetSetting(It.IsAny <object>(), It.IsAny <SettingsNamespace>(), It.IsAny <string>(), It.IsAny <object>())); var _adapter = new SettingAdapter(_accessor.Object, null, @namespace, "Setting"); _adapter.SetValue(null); _accessor.VerifyAll(); }
public void ShouldPassNewValueWhenSettingValue() { var value = new object(); _accessor.Setup(o => o.SetSetting(It.IsAny <object>(), It.IsAny <SettingsNamespace>(), It.IsAny <string>(), value)); var _adapter = new SettingAdapter(_accessor.Object, null, new SettingsNamespace("Namespace"), "Setting"); _adapter.SetValue(value); _accessor.VerifyAll(); }
public void ShouldPassStoreKeyWhenSettingValue() { var storeKey = "Key"; _accessor.Setup(o => o.SetSetting(storeKey, It.IsAny <SettingsNamespace>(), It.IsAny <string>(), It.IsAny <object>())); var _adapter = new SettingAdapter(_accessor.Object, storeKey, new SettingsNamespace("Namespace"), "Setting"); _adapter.SetValue(null); _accessor.VerifyAll(); }