title: Application.Current is null when calling from a unittest
body: <p>I have a method that I'm trying to call from a unit test.
  This method will in real life be run from a background thread. It uses some code to kick off in the invoke updates to the UI thread (using <code>Application.Current.Dispatcher.BeginInvoke</code> .... ).</p>
  
  <p>However <code>Application.Current</code> is <code>null</code> when being called from the unit tests.</p>
  
  <p>I don't really what to put an <code>if (Application.Current !=null)</code> around everything to fix.</p>
  
  <p>Is there any other way around this?</p>
  
  <p>_statusUpdates is an ObservableCollection</p>
  
  <p>Below is the part of the code in the method I'm looking to test (it is more of an integration test than a unit test to be fair).</p>
  
  <pre><code>Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, (EventHandler)delegate
  {
      _statusUpdates.Add(new StatusUpdate
      {
          DateTime = DateTime.Now,
          Message = "Checking For Messages"
      });
  }, null, null);
  </code></pre>