public void When_no_callback_is_registered_then_raise_should_not_throw_error() { //// Arrange var obj = new EventHandlerTestStub(); //// Act obj.RaiseEvent(); //// Assert }
public void When_raising_event_then_callback_should_be_called() { //// Arrange var count = 0; var obj = new EventHandlerTestStub(); obj.PropertyChanged += delegate { count++; }; //// Act obj.RaiseEvent(); //// Assert Assert.AreEqual(1, count); }