public void LocalDataSourceProvider_ThrowException_In_Finalize()
        {
            try
            {
                LocalDataSourceProvider provider = new LocalDataSourceProvider()
                {
                    ItemsSource = Enumerable.Range(0, 10).Select(t => new Tuple <int, int>(t, t)).ToList()
                };

                var description = new PropertyGroupDescription()
                {
                    PropertyName = "Item1"
                };
                ((IGroupDescription)description).GroupComparer = new BrokenComparer();
                provider.RowGroupDescriptions.Add(description);

                provider.Refresh();
                provider.BlockUntilRefreshCompletes();

                Assert.AreEqual(DataProviderStatus.Faulted, provider.Status);
            }
            catch (Exception e)
            {
                Assert.Fail(e.ToString());
            }
        }
        public void Status_WhenRefreshIsCalled_WhenItemsSourceIsNull_ShouldRemainUninitialized()
        {
            LocalDataSourceProvider provider = new LocalDataSourceProvider();

            provider.AggregateDescriptions.Add(new ListAggregateDescription()
            {
                PropertyName = "Item1"
            });

            this.provider.ItemsSource = Order.GetData();
            provider.Refresh();
            provider.BlockUntilRefreshCompletes();

            Assert.AreEqual(DataProviderStatus.Uninitialized, provider.Status);
        }