Пример #1
0
        public void GetAndSetValue()
        {
            PropertySet set = new PropertySet();

            Assert.IsNull(set.GetValue("key"));

            set.SetValue("key", "value");
            Assert.AreEqual("value", set.GetValue("key"));

            set.SetValue("key", "different value");
            Assert.AreEqual("different value", set.GetValue("key"));

            set.SetValue("key", null);
            Assert.IsNull(set.GetValue("key"));

            set.Add("key", "value1");
            Assert.AreEqual("value1", set.GetValue("key"));
        }
Пример #2
0
        public void GetAndSetValue()
        {
            PropertySet set = new PropertySet();

            Assert.IsNull(set.GetValue("key"));

            set.SetValue("key", "value");
            Assert.AreEqual("value", set.GetValue("key"));

            set.SetValue("key", "different value");
            Assert.AreEqual("different value", set.GetValue("key"));

            set.SetValue("key", null);
            Assert.IsNull(set.GetValue("key"));

            set.Add("key", "value1");
            Assert.AreEqual("value1", set.GetValue("key"));
        }