public void Test025() { var member = new MemberReflection(); var mi = member.From(() => default(Dummy01)[default(string)]); var instance = new Dummy01(); instance["DEF"] = "ABC"; Assert.AreEqual(member.GetValue(mi, instance, "DEF"), "ABC"); }
public void Test021() { var member = new MemberReflection(); var mi = member.From(() => default(Dummy02).ReadonlyProperty); var instance = new Dummy02 { MutableField = "ABC", MutableProperty = "DEF", }; Assert.AreEqual(instance.ReadonlyProperty, member.GetValue<string>(mi, instance)); }