I\'ve got a WPF application which calls MessageBox.Show() way back in the ViewModel (to check if the user really wants to delete). This actually works>
Services to the rescue. Using Onyx (disclaimer, I'm the author) this is as easy as:
public void Foo()
{
IDisplayMessage dm = this.View.GetService();
dm.Show("Hello, world!");
}
In a running application, this will indirectly call MessageBox.Show("Hello, world!"). When testing, the IDisplayMessage service can be mocked and provided to the ViewModel to do what ever you want to accomplish during the test.