title: Is there a way to run a setup method asynchronously before every test in an xunit test class?
body: <p>I have a set of tests with some setup required before each test.  The setup requires me to run it async and I don't particularly want to put async code running in a constructor, which is recommended by <a href="https://xunit.net/docs/shared-context" rel="nofollow noreferrer">xunit</a></p>
  
  <pre class="lang-cs prettyprint-override"><code>public class Tests
  {
      private async Task SetupForEachTestAsync()
      {
          // await setup
      }
  
      public Tests()
      {
          SetupForEachTestAsync.GetAwaiter().GetResult();
      }
  
      [Fact]
      public void Test1()
      {
          // My test
      }
  
      [Fact]
      public void Test2()
      {
          // My test
      }
  }
  </code></pre>
  
  <p>Any recommendations on how I can improve this?</p>