public void PropertyBindingWithLambdaExpressionTest() { TestClass o = new TestClass(); PropertyBinding binding = new PropertyBinding(o, () => o.IntProperty); o.IntProperty = 1907; Assert.AreEqual(o.IntProperty, binding.GetValue()); binding.SetValue(2012); Assert.AreEqual(o.IntProperty, binding.GetValue()); }
public void PropertyBindingWithStringTest() { TestClass o = new TestClass(); PropertyBinding binding = new PropertyBinding(o, "IntProperty"); o.IntProperty = 1907; Assert.AreEqual(o.IntProperty, binding.GetValue()); binding.SetValue(2012); Assert.AreEqual(o.IntProperty, binding.GetValue()); }