public void AttachedToEventWithReThrow() { TryCatch tryCatch = new TryCatch(new ReThrowExceptionHandler()); ComponentWithEvent component = new ComponentWithEvent(); component.PropertyChanged += tryCatch.Wrap <PropertyChangedEventHandler>(OnPropertyChanged); component.Name = "John"; }
public void AttachedToEvent() { handler.Count = 0; ComponentWithEvent component = new ComponentWithEvent(); component.PropertyChanged += tryCatch.Wrap <PropertyChangedEventHandler>(OnPropertyChanged); component.Name = "John"; Assert.AreEqual(1, handler.Count); }