title: MsTest with Task.ContinueWith() and Task.Wait()...?
body: <p>I'm still in .NET 4.0 and I was wondering whether this pattern will hold up well in various kinds of async unit testing situations:</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Noaa weather test: should read remote XML.
  /// &lt;/summary&gt;
  [TestMethod]
  public void ShouldReadRemoteXml()
  {
      var uri = new Uri("http://www.weather.gov/xml/current_obs/KLAX.xml");
      var wait = HttpVerbAsyncUtility.GetAsync(uri)
          .ContinueWith(
          t =&gt;
          {
              Assert.IsFalse(t.IsFaulted, "An unexpected XML read error has occurred.");
              Assert.IsTrue(t.IsCompleted, "The expected XML read did not take place.");
  
              if(t.IsCompleted &amp;&amp; !t.IsFaulted)
                  FrameworkFileUtility.Write(t.Result, @"NoaaWeather.xml");
          })
          .Wait(TimeSpan.FromSeconds(7));
  
      Assert.IsTrue(wait, "The expected XML read did not take place within seven seconds.");
  }
  </code></pre>
  
  <p>Will this <code>Task.ContinueWith()...Task.Wait()</code> pattern hold up in the real world? I'm relatively new to formally thinking about Unit Testing (especially asynchronous unit testing) so please don't hold back on the basics :)</p>