title: Await Tasks in Test Setup Code in xUnit.net?
body: <p>The exact situation is I'm doing E2E tests with Protractor.NET (.NET port of AngularJS's Protractor E2E framework) and I would like to make some web requests (and the API -- <code>System.Net.Http.HttpClient</code> -- has all Async/<code>Task</code> methods) to Arrange my test before I Act/Assert, only I need to do this same Arrange-ing for several tests.</p>
  
  <p>I'm using xUnit.net as my test runner they use an interface (<code>IUseFixture&lt;T&gt;</code>) for per-fixture setup code.  It would be nice if there was a <code>IAsyncUseFixture&lt;T&gt;</code> that had a <code>Task SetFixtureAsync(T t);</code> or something.  I don't think such a thing exists.  Additionally I don't think constructors can use <code>await</code> either, and constructors are the only other way to execute the same block of code per-test in xUnit.net.</p>
  
  <p>What are my options?  <code>.Result</code>?  Isn't that bad practice (deadlock)?</p>