public void Test027() { var member = new MemberReflection(); var mi = member.From(() => default(Dummy01)[default(string)]); var instance = new Dummy01(); instance["DEF"] = "ABC"; Assert.AreEqual(instance["DEF"], "ABC"); member.SetValue(mi, instance, "GHI", "DEF"); Assert.AreEqual(instance["DEF"], "GHI"); }
public void Test023() { var member = new MemberReflection(); var mi = member.From(() => default(Dummy02).MutableProperty); var instance = new Dummy02 { MutableField = "ABC", MutableProperty = "DEF", }; Assert.AreEqual(instance.MutableProperty, "DEF"); member.SetValue(mi, instance, "GHI"); Assert.AreEqual(instance.MutableProperty, "GHI"); }