Esempio n. 1
0
        public void CopyBindableAndBindToThis()
        {
            AssertBindables(true);
            AssertBindables(false);

            void AssertBindables(bool isBindable)
            {
                var a = new Bindable <int>(2, 1)
                {
                    IsBindable = isBindable
                };
                var b = a.CopyBindableAndBindToThis();

                Assert.AreEqual(a.Value, b.Value);
                Assert.AreEqual(a.DefaultValue, b.DefaultValue);
                Assert.IsFalse(a.IsBoundTo(b));
                Assert.AreEqual(isBindable, b.IsBoundTo(a));
                Assert.AreEqual(a.IsBindable, b.IsBindable);
            }
        }