public void SetValue_ChangesValueInUnderlyingDictionaryToSpecifiedValue()
        {
            var data = new Dictionary <string, object>();

            data.Add("Property1", "Value1");
            data.Add("Property2", 2);

            var pd1 = new DictionaryPropertyDescriptor(data, "Property1", typeof(string));

            pd1.SetValue(null, "Modified");
            data["Property1"].Should().Be("Modified");

            var pd2 = new DictionaryPropertyDescriptor(data, "Property2", typeof(int));

            pd2.SetValue(null, 0);
            data["Property2"].Should().Be(0);
        }
        public void SetValue_ChangesValueInUnderlyingDictionaryToSpecifiedValue()
        {
            IDictionary<string, object> data = new Dictionary<string, object>();
            data.Add("Property1", "Value1");
            data.Add("Property2", 2);

            DictionaryPropertyDescriptor pd1 = new DictionaryPropertyDescriptor(data, "Property1", typeof(string));
            pd1.SetValue(null, "Modified");
            Assert.That(data["Property1"], Is.EqualTo("Modified"));

            DictionaryPropertyDescriptor pd2 = new DictionaryPropertyDescriptor(data, "Property2", typeof(int));
            pd2.SetValue(null, 0);
            Assert.That(data["Property2"], Is.EqualTo(0));
        }