Exemplo n.º 1
0
        public void CreateNewBindableBoundToThis()
        {
            var a = new Bindable <int>(2, 1)
            {
                IsBindable = false
            };
            var b = a.CreateNewBindableBoundToThis();

            // default(int) is necessary because the Assert class does not force object type equality
            Assert.AreEqual(default(int), b.Value);
            Assert.AreEqual(default(int), b.DefaultValue);
            Assert.IsFalse(a.IsBoundTo(b));
            Assert.IsTrue(b.IsBoundTo(a));
            Assert.IsFalse(a.IsBindable);
            Assert.IsTrue(b.IsBindable);
        }