public void DisposeDeregistersPropertyChangedEventFromSource() { var source = new TestWidget(); var obj = new BindINotifyPropertyChanged(source, nameof(source.TestBool)); obj.Dispose(); Assert.IsTrue(source.PropertyChangedEventRemoved); }
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); }