title: Unit Testing: hard dependency MessageBox.Show()
body: <p>What ways can the SampleConfirmationDialog be unit tested? The SampleConfirmationDialog would be exercised via acceptance tests, however how could we unit test it, seeing as MessageBox is not abstract and no matching interface?</p>
  
  <pre><code>public interface IConfirmationDialog
  {
      /// &lt;summary&gt;
      /// Confirms the dialog with the user
      /// &lt;/summary&gt;
      /// &lt;returns&gt;True if confirmed, false if not, null if cancelled&lt;/returns&gt;
      bool? Confirm();
  }
  
  
  /// &lt;summary&gt;
  /// Implementation of a confirmation dialog
  /// &lt;/summary&gt;
  public class SampleConfirmationDialog : IConfirmationDialog
  {
      /// &lt;summary&gt;
      /// Confirms the dialog with the user
      /// &lt;/summary&gt;
      /// &lt;returns&gt;True if confirmed, false if not, null if cancelled&lt;/returns&gt;
      public bool? Confirm()
      {
          return MessageBox.Show("do operation x?", "title", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes;
      }
  }
  </code></pre>