コード例 #1
0
        public void GetBaseValue_LocalValue_Returns_Style_Value()
        {
            var target = new Class3();

            target.SetValue(Class1.FooProperty, "style", BindingPriority.Style);
            target.SetValue(Class1.FooProperty, "animated", BindingPriority.Animation);
            Assert.Equal("style", target.GetBaseValue(Class1.FooProperty, BindingPriority.LocalValue).Value);
        }
コード例 #2
0
        public void GetBaseValue_Style_Returns_Style_Value()
        {
            var target = new Class3();

            target.SetValue(Class1.FooProperty, "local");
            target.SetValue(Class1.FooProperty, "style", BindingPriority.Style);
            target.Bind(Class1.FooProperty, new BehaviorSubject <string>("animated"), BindingPriority.Animation);
            Assert.Equal("style", target.GetBaseValue(Class1.FooProperty, BindingPriority.Style));
        }
コード例 #3
0
        public void Validation_Can_Be_Overridden_With_Null()
        {
            var target = new Class3();

            target.SetValue(Class1.QuxProperty, 50);
            Assert.Equal(50, target.GetValue(Class1.QuxProperty));
        }
コード例 #4
0
        public void GetBaseValue_LocalValue_Ignores_Default_Value()
        {
            var target = new Class3();

            target.SetValue(Class1.FooProperty, "animated", BindingPriority.Animation);
            Assert.False(target.GetBaseValue(Class1.FooProperty, BindingPriority.LocalValue).HasValue);
        }
コード例 #5
0
        public void GetBaseValue_Style_Ignores_LocalValue_Animated_Value()
        {
            var target = new Class3();

            target.Bind(Class1.FooProperty, new BehaviorSubject <string>("animated"), BindingPriority.Animation);
            target.SetValue(Class1.FooProperty, "local");
            Assert.False(target.GetBaseValue(Class1.FooProperty, BindingPriority.Style).HasValue);
        }