Exemplo n.º 1
0
            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);
            }
Exemplo n.º 2
0
            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);
            }