title: Rhino Mock and WPF Window Dialog
body: <p>I'm writing Unit-Tests for an OK_Execute Command in an MvvM-Scenario.</p>
  
  <p>Now that's working fine until the method calls:</p>
  
  <pre><code>        obj.DialogResult = !datumExistiertBereits || datumUeberschreiben;
          obj.Close();  
  </code></pre>
  
  <p>where the first line fires the following InvalidOperationException:</p>
  
  <blockquote>
    <p>DialogResult can be set only after Window is created and shown as dialog.</p>
  </blockquote>
  
  <p>Now I wonder how I can make my window stub object responsible to these calls without really showing the dialog in my Unit-Tests?</p>
  
  <p>Thanks in advance</p>
  
  <p>Steav</p>