public void InsertRange() { 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.InsertRange(0, new int[] { 1, 2, 3, 4, 5 }); Assert.Equal("Count", Value); Assert.Equal(NotifyCollectionChangedAction.Add, Value2); }
public void Clear() { 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.Clear(); Assert.Equal("Count", Value); Assert.Equal(NotifyCollectionChangedAction.Reset, 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); }
public ObservableListTests() { TestObject = new BigBook.ObservableList <int>(); }