public void DerivedCollectionDependencyTest() { var changed_properties = new List<string>(); var obj = new DerivedCollectionDependencyObject(); obj.PropertyChanged += (sender, args) => changed_properties.Add(args.PropertyName); obj.BaseProp1.Add(42); Assert.AreEqual(1, changed_properties.Count, "1 property changed events expected"); Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected"); }
public void DerivedCollectionDependencyTest() { var changed_properties = new List <string>(); var obj = new DerivedCollectionDependencyObject(); obj.PropertyChanged += (sender, args) => changed_properties.Add(args.PropertyName); obj.BaseProp1.Add(42); Assert.AreEqual(1, changed_properties.Count, "1 property changed events expected"); Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected"); }