public void EditableObjectModelCollection_CollectionTest2()
        {
            var people = new EditablePersonCollection();
            var list   = new List <EditablePerson>();

            Assert.IsFalse(people.IsChangedLocal);
            Assert.IsFalse(people.IsChanged);

            var person1 = new EditablePerson();
            var person2 = new EditablePerson();

            //var person3 = new ChangeTrackingSimplePerson();

            people.Add(person1);
            list.Add(person1);

            CollectionAssert.AreEqual(list, people);
            Assert.IsTrue(people.IsChangedLocal);

            people.AcceptChanges();
            CollectionAssert.AreEqual(list, people);
            Assert.IsFalse(people.IsChangedLocal);

            people.Add(person2);
            list.Add(person2);

            CollectionAssert.AreEqual(list, people);
            Assert.IsTrue(people.IsChangedLocal);

            people.RejectChanges();
            list.Remove(person2);

            CollectionAssert.AreEqual(list, people);
            Assert.IsFalse(people.IsChangedLocal);

            people.Remove(person1);
            list.Remove(person1);


            CollectionAssert.AreEqual(list, people);
            Assert.IsTrue(people.IsChangedLocal);

            people.AcceptChanges();
            CollectionAssert.AreEqual(list, people);
            Assert.IsFalse(people.IsChangedLocal);
        }
        public void EditableObjectModelCollection_CollectionTest2()
        {
            var people = new EditablePersonCollection();
            var list = new List<EditablePerson>();
            Assert.IsFalse(people.IsChangedLocal);
            Assert.IsFalse(people.IsChanged);

            var person1 = new EditablePerson();
            var person2 = new EditablePerson();
            //var person3 = new ChangeTrackingSimplePerson();

            people.Add(person1);
            list.Add(person1);

            CollectionAssert.AreEqual(list, people);
            Assert.IsTrue(people.IsChangedLocal);

            people.AcceptChanges();
            CollectionAssert.AreEqual(list, people);
            Assert.IsFalse(people.IsChangedLocal);

            people.Add(person2);
            list.Add(person2);

            CollectionAssert.AreEqual(list, people);
            Assert.IsTrue(people.IsChangedLocal);

            people.RejectChanges();
            list.Remove(person2);

            CollectionAssert.AreEqual(list, people);
            Assert.IsFalse(people.IsChangedLocal);

            people.Remove(person1);
            list.Remove(person1);

            CollectionAssert.AreEqual(list, people);
            Assert.IsTrue(people.IsChangedLocal);

            people.AcceptChanges();
            CollectionAssert.AreEqual(list, people);
            Assert.IsFalse(people.IsChangedLocal);
        }