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);
        }
        public void ForwardsChangedPropertyFromTargetToSource()
        {
            object newValue = "1";
            var    target   = new Mock <TestData.ViewModel.WithINotifyPropertyChangedImplementation>();

            target.Setup(x => x.ObjectProperty).Returns(newValue);
            var source = new Mock <TestData.View.WidgetWithObjectPropery>();

            var obj = new BindINotifyPropertyChanged(source.Object, nameof(source.Object.ObjectProperty));

            obj.Bind(target.Object, nameof(target.Object.ObjectProperty));

            target.Raise(x => x.PropertyChanged += null, new PropertyChangedEventArgs(nameof(target.Object.ObjectProperty)));

            source.VerifySet(x => x.ObjectProperty = newValue);
        }