public void Add() { var Value = ""; var Value2 = NotifyCollectionChangedAction.Move; var ListVariable = new BigBook.ObservableList <int>(); ListVariable.PropertyChanged += (x, y) => Value = y.PropertyName; ListVariable.CollectionChanged += (x, y) => Value2 = y.Action; ListVariable.Add(10); Assert.Equal("Count", Value); Assert.Equal(NotifyCollectionChangedAction.Add, Value2); }
public void IndexSet() { var Value = ""; var Value2 = NotifyCollectionChangedAction.Move; var ListVariable = new BigBook.ObservableList <int>(); ListVariable.PropertyChanged += (x, y) => Value = y.PropertyName; ListVariable.CollectionChanged += (x, y) => Value2 = y.Action; ListVariable.Add(10); Value = ""; ListVariable[0] = 11; Assert.Equal("", Value); Assert.Equal(NotifyCollectionChangedAction.Replace, Value2); }