Esempio n. 1
0
        public void ShouldSetValue()
        {
            var testObject = new TestObject {
                Value = 123.4f
            };
            Func <float>   getter   = () => testObject.Value;
            Action <float> setter   = f => { testObject.Value = f; };
            var            property = new DelegateAnimatableProperty <float>(getter, setter);

            property.SetValue(234.5f);
            Assert.AreEqual(234.5f, ((IAnimatableProperty <float>)property).AnimationValue);
            Assert.AreEqual(234.5f, property.GetValue());
        }
Esempio n. 2
0
        public void ShouldSetValue()
        {
            var testObject = new TestObject { Value = 123.4f };
              Func<float> getter = () => testObject.Value;
              Action<float> setter = f => { testObject.Value = f; };
              var property = new DelegateAnimatableProperty<float>(getter, setter);

              property.SetValue(234.5f);
              Assert.AreEqual(234.5f, ((IAnimatableProperty<float>)property).AnimationValue);
              Assert.AreEqual(234.5f, property.GetValue());
        }