Пример #1
0
        public void TestSetValueWithoutTrigger()
        {
            BindableInt bindableInt  = new BindableInt(0);
            int         updatedValue = bindableInt.Value;

            bindableInt.OnNewValue += (val) => updatedValue = val;

            bindableInt.Value = 1;
            Assert.AreEqual(1, bindableInt.Value);
            Assert.AreEqual(bindableInt.Value, updatedValue);

            bindableInt.SetWithoutTrigger(5);
            Assert.AreEqual(5, bindableInt.Value);
            Assert.AreEqual(1, updatedValue);
        }