예제 #1
0
        public void DerivedSimpleDependencyTest()
        {
            var changed_properties = new List<string>();
            var obj = new DerivedSimpleDependencyObject();
            obj.PropertyChanged += (sender, args) => changed_properties.Add(args.PropertyName);

            obj.BaseProp1 = 42;

            Assert.AreEqual(2, changed_properties.Count, "2 property changed events expected");
            Assert.IsTrue(changed_properties.Contains("BaseProp1"), "BaseProp1 property changed event expected");
            Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected");
        }
예제 #2
0
        public void DerivedSimpleDependencyTest()
        {
            var changed_properties = new List <string>();
            var obj = new DerivedSimpleDependencyObject();

            obj.PropertyChanged += (sender, args) => changed_properties.Add(args.PropertyName);

            obj.BaseProp1 = 42;

            Assert.AreEqual(2, changed_properties.Count, "2 property changed events expected");
            Assert.IsTrue(changed_properties.Contains("BaseProp1"), "BaseProp1 property changed event expected");
            Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected");
        }