예제 #1
0
        public void DisposeDeregistersPropertyChangedEventFromSource()
        {
            var source = new TestWidget();
            var obj    = new BindINotifyPropertyChanged(source, nameof(source.TestBool));

            obj.Dispose();

            Assert.IsTrue(source.PropertyChangedEventRemoved);
        }
예제 #2
0
        public void DisposeDeregistersPropertyChangedEventFromTarget()
        {
            var source = new TestWidget();
            var target = new TestViewModel();
            var obj    = new BindINotifyPropertyChanged(source, nameof(source.TestBool));

            obj.Bind(target, nameof(target.TestBool));

            obj.Dispose();

            Assert.IsTrue(target.PropertyChangedEventRemoved);
        }