public void CanResetTestNoSetterTest() { PropertyDescriptor p = TypeDescriptor.GetProperties(typeof(CanResetNoSetter_test))["Prop"]; CanResetNoSetter_test test = new CanResetNoSetter_test(); Assert.IsFalse(p.CanResetValue(test), "1"); Assert.AreEqual(5, test.Prop, "2"); p.ResetValue(test); Assert.AreEqual(10, test.Prop, "3"); }
public void CanResetTestNoSetterTest () { PropertyDescriptor p = TypeDescriptor.GetProperties (typeof (CanResetNoSetter_test))["Prop"]; CanResetNoSetter_test test = new CanResetNoSetter_test (); Assert.IsFalse (p.CanResetValue (test), "1"); Assert.AreEqual (5, test.Prop, "2"); p.ResetValue (test); Assert.AreEqual (10, test.Prop, "3"); }