public void when_RemoveRangeAsync_is_called_and_IsNotifying_is_false_then_Reset_event_fired() { var testSchedulerProvider = new TestDispatcherSchedulerProvider(); var result = false; var bindableCollection = new BindableCollection <int>(testSchedulerProvider); var items = Enumerable.Range(0, 1).ToList(); bindableCollection.AddRange(items); bindableCollection.CollectionChanged += (sender, args) => { if (args.Action == NotifyCollectionChangedAction.Reset) { result = true; } }; bindableCollection.IsNotifying = false; bindableCollection.RemoveRangeAsync(items); Assert.That(result, Is.False); }
public void when_RemoveRangeAsync_is_called_then_Reset_event_fired() { var testSchedulerProvider = new TestDispatcherSchedulerProvider(); var result = false; var bindableCollection = new BindableCollection<int>(testSchedulerProvider); var items = Enumerable.Range(0, 1).ToList(); bindableCollection.AddRange(items); bindableCollection.CollectionChanged += (sender, args) => { if (args.Action == NotifyCollectionChangedAction.Reset) { result = true; } }; bindableCollection.RemoveRangeAsync(items); Assert.That(result, Is.True); }