Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
        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();
        }