public void TestForSetPropertyRef()
        {
            var instance = new NotifyPropertyChangedObjectInstance();

            Assert.IsNull(instance.Name);
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);

            instance.Name = null;
            Assert.IsNull(instance.Name);
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);

            instance.Name = "1";
            Assert.AreEqual(instance.Name, "1");
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 1);
            Assert.IsTrue(instance.LastChangedPropertyName[0] == "Name");
            instance.LastChangedPropertyName.Clear();

            instance.Name = "1";
            Assert.AreEqual(instance.Name, "1");
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);

            instance._name = "6";
            instance.RegisterForEndRefresh <NotifyPropertyChangedObjectInstance>(z => z.Name);
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);
            instance.EndRefresh();
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 1);
            Assert.IsTrue(instance.LastChangedPropertyName[0] == "Name");
        }
        public void TestForSetPropertyRef()
        {
            var instance = new NotifyPropertyChangedObjectInstance();

            Assert.IsNull(instance.Name);
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);

            instance.Name = null;
            Assert.IsNull(instance.Name);
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);

            instance.Name = "1";
            Assert.AreEqual(instance.Name, "1");
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 1);
            Assert.IsTrue(instance.LastChangedPropertyName[0] == "Name");
            instance.LastChangedPropertyName.Clear();

            instance.Name = "1";
            Assert.AreEqual(instance.Name, "1");
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);

            instance._name = "6";
            instance.RegisterForEndRefresh<NotifyPropertyChangedObjectInstance>(z => z.Name);
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 0);
            instance.EndRefresh();
            Assert.IsTrue(instance.LastChangedPropertyName.Count == 1);
            Assert.IsTrue(instance.LastChangedPropertyName[0] == "Name");
        }