public void PropertyChangedEventHandlerIsRaised() { ObservableObjectStub obj = new ObservableObjectStub(); bool raised = false; obj.PropertyChanged += (s, e) => { Assert.AreEqual(e.PropertyName, "TrackingProperty"); raised = true; }; obj.TrackingProperty = "some value"; if (!raised) { Assert.Fail("NotifyPropertyChanged event not raised"); } }
public void Initialize() { _stub = new ObservableObjectStub(); _stub.PropertyChanged += (sender, args) => _propertyHasChanged = true; _propertyHasChanged = false; }