示例#1
0
        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));
        }
示例#2
0
 public void VerifyThatWhenResultIsChangedEventIsHandled()
 {
     DialogCloser.SetDialogResult(this.window, null);
     Assert.IsNull(this.window.DialogResult);
 }