public void RefreshWithNonIListSourceTest()
        {
            TestEnumerableCollection list = new TestEnumerableCollection();

            list.Add(new TestClass {
                IntProperty = 1, StringProperty = "Test 1"
            });
            list.Add(new TestClass {
                IntProperty = 2, StringProperty = "Test 2"
            });

            PagedCollectionView pcv = new PagedCollectionView(list);

            pcv.SortDescriptions.Add(new SortDescription("IntProperty", ListSortDirection.Ascending));
            Assert.AreEqual(2, pcv.Count);

            // add items to list and Refresh
            list.Add(new TestClass()
            {
                IntProperty = 3, StringProperty = "Test 3"
            });
            list.Add(new TestClass()
            {
                IntProperty = 4, StringProperty = "Test 4"
            });
            pcv.Refresh();
            Assert.AreEqual(4, pcv.Count);

            // remove items from list and Refresh
            list.RemoveAt(0);
            list.RemoveAt(0);
            pcv.Refresh();
            Assert.AreEqual(2, pcv.Count);
        }
        public void RefreshWithNonIListSourceTest()
        {
            TestEnumerableCollection list = new TestEnumerableCollection();
            list.Add(new TestClass { IntProperty = 1, StringProperty = "Test 1" });
            list.Add(new TestClass { IntProperty = 2, StringProperty = "Test 2" });

            PagedCollectionView pcv = new PagedCollectionView(list);
            pcv.SortDescriptions.Add(new SortDescription("IntProperty", ListSortDirection.Ascending));
            Assert.AreEqual(2, pcv.Count);

            // add items to list and Refresh
            list.Add(new TestClass() { IntProperty = 3, StringProperty = "Test 3" });
            list.Add(new TestClass() { IntProperty = 4, StringProperty = "Test 4" });
            pcv.Refresh();
            Assert.AreEqual(4, pcv.Count);

            // remove items from list and Refresh
            list.RemoveAt(0);
            list.RemoveAt(0);
            pcv.Refresh();
            Assert.AreEqual(2, pcv.Count);
        }