public void InternalObservableObjectPropertyDependencyTest()
        {
            var changed_properties = new List<string>();
            var base_obj = new InternalObservableObjectPropertyDependencyBaseObject();
            var obj = new InternalObservableObjectPropertyDependencyObject(base_obj);
            obj.PropertyChanged += (sender, args) => changed_properties.Add(args.PropertyName);

            base_obj.BaseProp1 = 42;

            Assert.AreEqual(1, changed_properties.Count, "1 property changed event expected");
            Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected");
            changed_properties.Clear();

            base_obj = new InternalObservableObjectPropertyDependencyBaseObject();
            obj.BaseObject = base_obj;
            base_obj.BaseProp1 = 23;

            Assert.AreEqual(2, changed_properties.Count, "2 property changed event expected");
            Assert.IsTrue(changed_properties.Contains("BaseObject"), "BaseObject property changed event expected");
            Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected");
        }
        public void InternalObservableObjectPropertyDependencyTest()
        {
            var changed_properties = new List <string>();
            var base_obj           = new InternalObservableObjectPropertyDependencyBaseObject();
            var obj = new InternalObservableObjectPropertyDependencyObject(base_obj);

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

            base_obj.BaseProp1 = 42;

            Assert.AreEqual(1, changed_properties.Count, "1 property changed event expected");
            Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected");
            changed_properties.Clear();

            base_obj           = new InternalObservableObjectPropertyDependencyBaseObject();
            obj.BaseObject     = base_obj;
            base_obj.BaseProp1 = 23;

            Assert.AreEqual(2, changed_properties.Count, "2 property changed event expected");
            Assert.IsTrue(changed_properties.Contains("BaseObject"), "BaseObject property changed event expected");
            Assert.IsTrue(changed_properties.Contains("Prop1"), "Prop1 property changed event expected");
        }
        public InternalObservableObjectPropertyDependencyObject(InternalObservableObjectPropertyDependencyBaseObject base_object)
        {
            BaseObject = base_object;

            AddDependency(() => BaseObject.BaseProp1, () => Prop1);
        }
        public InternalObservableObjectPropertyDependencyObject(InternalObservableObjectPropertyDependencyBaseObject base_object)
        {
            BaseObject = base_object;

            AddDependency(() => BaseObject.BaseProp1, () => Prop1);
        }