Inheritance: INotifyPropertyChanged
        public void ExtendedObservableCollection_AddRange_Test1()
        {
            using (var verify = new Verify())
            {
                var weakNotifier = new WeakNotifier();
                var notifier = new Notifier();
                var temp = new[] { notifier, weakNotifier };

                var result = new ObservableCollectionExtended<object>();
                result.AddRange(temp);
                ConstructorAssertions(verify, result, weakNotifier, notifier);
            }
        }
        private static void ConstructorAssertions(Verify verify, ObservableCollectionExtended<object> result, WeakNotifier weakNotifier, Notifier notifier)
        {
            var itemAssert = new ItemPropertyChangedEventTest(verify, result);

            var itemAddedEventQueue = new Queue<Tuple<object, ItemEventArgs<object>>>();
            result.ItemAdded += (s, e) => itemAddedEventQueue.Enqueue(Tuple.Create(s, e));

            var itemRemovedEventQueue = new Queue<Tuple<object, ItemEventArgs<object>>>();
            result.ItemRemoved += (s, e) => itemRemovedEventQueue.Enqueue(Tuple.Create(s, e));

            weakNotifier.Age += 1;
            itemAssert.ExpectEvent(weakNotifier, "Age");

            notifier.Age += 1;
            itemAssert.ExpectEvent(notifier, "Age");

            var oldCount = result.Count;
            result.Clear();
            verify.AreEqual(oldCount, itemRemovedEventQueue.Count, "incorrect number of items reported as being removed");

            weakNotifier.Age += 1;
            notifier.Age += 1;

            verify.AreEqual(0, result.Count, "The collection should be empty");
            itemAssert.ExpectCountEquals(0, "ItemPropertyChanged events were fired when the collection was supposed to be empty.");

            result.Add(weakNotifier);
            result.Add(notifier);
            verify.AreEqual(2, result.Count, "The new items were not added");
            verify.AreEqual(2, itemAddedEventQueue.Count, "The new item events didn't fire");
            CollectionAssert.AreEqual(result, result.ReadOnlyWrapper);

            itemRemovedEventQueue.Clear();
            result.RemoveAt(0);
            verify.AreEqual(1, itemRemovedEventQueue.Count, "the item wasn't removed");
            verify.AreSame(notifier, result[0], "the wrong item was removed");
            CollectionAssert.AreEqual(result, result.ReadOnlyWrapper);

            itemAddedEventQueue.Clear();
            itemRemovedEventQueue.Clear();
            result[0] = weakNotifier;
            verify.AreSame(weakNotifier, result[0], "the item wasn't updated");
            verify.AreEqual(1, itemAddedEventQueue.Count, "the add event for replacing an item didn't fire");
            verify.AreEqual(1, itemRemovedEventQueue.Count, "the remove event for replacing an item didn't fire");
            CollectionAssert.AreEqual(result, result.ReadOnlyWrapper);
        }
        public void ExtendedObservableCollection_ConstructorTest1()
        {
            using (var verify = new Verify())
            {
                var result = new ObservableCollectionExtended<object>();
                result.Add(1);
                result.Add("Boat");

                var weakNotifier = new WeakNotifier();
                var notifier = new Notifier();

                result.Add(weakNotifier);
                result.Add(notifier);

                ConstructorAssertions(verify, result, weakNotifier, notifier);
            }
        }
        public void ExtendedObservableCollection_ConstructorTest3()
        {
            using (var verify = new Verify())
            {
                var weakNotifier = new WeakNotifier();
                var notifier = new Notifier();
                var temp = new[] { notifier, weakNotifier };

                var result = new ObservableCollectionExtended<object>(temp.AsEnumerable());

                ConstructorAssertions(verify, result, weakNotifier, notifier);
            }
        }
        public void ExtendedReadOnlyObservableCollection_OnItemPropertyChanged()
        {
            using (var verify = new Verify())
            {
                var list = new ObservableCollectionExtended<Notifier>();
                var result = new ReadOnlyObservableCollectionExtended<Notifier>(list);
                var itemPropertyAssert = new ItemPropertyChangedEventTest(verify, result);

                var notifier = new Notifier();
                list.Add(notifier);
                notifier.Name = "Frank";

                itemPropertyAssert.ExpectEvent(notifier, "Name");
            }
        }