public void real_properties_can_be_set() { var frodoType = _ts.FromClr <Frodo>(); var naughty = new Frodo(); frodoType.FindPropertyByPath("IsGood") .TrySetValue(naughty, false).ShouldBeTrue(); naughty.IsGood.ShouldBeFalse(); }
public void can_assign_property_on_original_type_instance() { var frodoType = _ts.FromClr <Frodo>(); var property = frodoType.FindPropertyByPath("IsEvil"); property.ShouldNotBeNull(); var frodo = new Frodo(); property.TrySetValue(frodo, true).ShouldBeTrue(); frodo.IsGood.ShouldBeFalse(); }