public void Add() { string Value = ""; NotifyCollectionChangedAction Value2 = NotifyCollectionChangedAction.Move; var ListVariable = new Utilities.DataTypes.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 Add() { string Value = ""; NotifyCollectionChangedAction Value2 = NotifyCollectionChangedAction.Move; var ListVariable = new Utilities.DataTypes.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); }