public async Task Clear() { var list = new DictionaryReactiveCollectionSource <string, int>(); var notificationTask = list.ReactiveCollection.Changes .Skip(2) .FirstAsync() .ToTask(); list.Add("Key", 1); list.Clear(); await Verify(notificationTask); }
public async Task Clear() { var list = new DictionaryReactiveCollectionSource <string, int>(); var notificationTask = list.ReactiveCollection.Changes .Skip(2) .FirstAsync() .ToTask(); list.Add("Key", 1); list.Clear(); var notification = await notificationTask; notification.Action.Should().Be(NotifyCollectionChangedAction.Reset); notification.NewItems.Should().BeEmpty(); notification.OldItems.Should().BeEmpty(); notification.Current.Should().BeEmpty(); }
public async Task Clear() { var list = new DictionaryReactiveCollectionSource<string, int>(); var notificationTask = list.ReactiveCollection.Changes .Skip(2) .FirstAsync() .ToTask(); list.Add("Key", 1); list.Clear(); var notification = await notificationTask; notification.Action.Should().Be(NotifyCollectionChangedAction.Reset); notification.NewItems.Should().BeEmpty(); notification.OldItems.Should().BeEmpty(); notification.Current.Should().BeEmpty(); }