public void Test_PCB_CollectionChanged() { var collectionChanged = false; var sut = new ThreadSafeObservableCollection<TestPCB>(); sut.CollectionChanged += (s, e) => collectionChanged = sut_CollectionChanged(e); var item = new TestPCB(); sut.Add(item); Assert.IsTrue(collectionChanged); }
public void Test_PCB_WithoutChange() { var called = false; var item = new TestPCB(); item.PropertyChanged += (s, e) => { called = true; Debug.WriteLine(e.PropertyName); }; var sut = new ThreadSafeObservableCollection<TestPCB> {item}; Assert.IsFalse(called); }