public void VerifyThatEventHandlerIsCalledWhenDialogResultIsSetToTrue() { // Setting the dialog result to anything but null throws an exception. // What we are testing here is that the dialog result is set on the window // The fact that this happens demonstrates the event is handled Assert.Throws <InvalidOperationException>(() => DialogCloser.SetDialogResult(this.window, true)); }
public void VerifyThatWhenResultIsChangedEventIsHandled() { DialogCloser.SetDialogResult(this.window, null); Assert.IsNull(this.window.DialogResult); }