コード例 #1
0
 public void TrackablePropertyChangedShouldFireWhenClassFiresIt()
 {
     var testSubject = new _ObjWithTrackablePropertyChangeNotification();
     testSubject.MonitorEvents();
     testSubject.FireDescriptionChangedBecauseTestSaidTo();
     testSubject.ShouldRaisePropertyChangeFor(s => s.Description);
 }
コード例 #2
0
 public void TrackablePropertyChangedShouldCorrectlyCallNonDynamicMethods()
 {
     var testSubject = new _ObjWithTrackablePropertyChangeNotification();
     _propertyChanged = null;
     testSubject.PropertyChanged += _GotNotified;
     testSubject.FireDescriptionChangedBecauseTestSaidTo();
     _propertyChanged.Should().Be(Extract.PropertyNameFrom(() => testSubject.Description));
 }