public void ExceptionPresenter_ContinueClicked_SetsDialogResultAndClosesDialog() { // Arrange using (var presenter = new MockDialogExceptionPresenter(null)) { presenter.ShowDialog(null, new Exception("Foo"), false); Assert.IsTrue(presenter.MockDialog.Shown); // Act presenter.ContinueClicked(); // Assert Assert.AreEqual(DialogResult.Ignore, presenter.Dialog.DialogResult); Assert.IsFalse(presenter.MockDialog.Shown); } }
public void ExceptionPresenter_BuildExceptionText_FromPropertiesAndException() { // Arrange var properties = new Dictionary <string, string> { { "Fizz", "Bizz" } }; using (var presenter = new MockDialogExceptionPresenter(properties)) { presenter.ShowDialog(null, new Exception("Foo"), false); // Act string text = presenter.BuildExceptionText(); // Assert Assert.AreNotEqual(String.Empty, text); } }