public void Test_PropertyNameBinding_MissingProperty()
 {
     Assert.ThrowsException <NullReferenceException>(() => {
         PropertyNameDataPointBinding binding = new PropertyNameDataPointBinding();
         binding.PropertyName = "Wrong";
         binding.GetValue(new BusinessObject());
     });
 }
        public void Test_PropertyNameBinding_DynamicObject()
        {
            PropertyNameDataPointBinding binding = new PropertyNameDataPointBinding();

            binding.PropertyName = "Value";

            dynamic obj = new MyDynamicObject();

            obj.Value = 1;

            Assert.AreEqual <double>(1, (double)binding.GetValue(obj), "DynamicObject Value not looked-up correctly");
        }
        public void Test_PropertyNameBinding()
        {
            PropertyNameDataPointBinding binding = new PropertyNameDataPointBinding();

            binding.PropertyName = "Value";

            BusinessObject obj = new BusinessObject()
            {
                Value = 1
            };

            Assert.AreEqual <double>(1, (double)binding.GetValue(obj), "Value not looked-up correctly");
        }