/// <summary> /// Creates a fresh unit test setup. /// </summary> /// <param name = "initialItems">Any initial items to be added to the backing collection.</param> private void _Setup(params TestBase[] initialItems) { mBackingCollection = new ObservableCollection <TestBase>(initialItems); mWrappingCollection = new ReadOnlyWrappingCollection <TestWrapper, TestBase>( mBackingCollection, _Wrap, _Unwrap); mCollectionChangedEvents = new List <NotifyCollectionChangedEventArgs>(); mWrappingCollection.CollectionChanged += _HandleWrappingCollectionChanged; _AssertBackingAndWrappedAreSynced(); }
/// <summary> /// Creates a fresh unit test setup. /// </summary> /// <param name = "initialItems">Any initial items to be added to the backing collection.</param> private void _Setup(params TestBase[] initialItems) { mBackingCollection = new ObservableCollection<TestBase>(initialItems); mWrappingCollection = new ReadOnlyWrappingCollection<TestWrapper, TestBase>( mBackingCollection, _Wrap, _Unwrap); mCollectionChangedEvents = new List<NotifyCollectionChangedEventArgs>(); mWrappingCollection.CollectionChanged += _HandleWrappingCollectionChanged; _AssertBackingAndWrappedAreSynced(); }