title: How to run setup code only once in an xUnit.net test
body: <p>I'm trying to setup my tests using Xunit. I have a requirement to delete all images in a folder start of the tests, and then each method does some image resizing and saves a copy of it's output to the folder. The folder should only be emptied once, and then each method will save their own image into the folder.</p>
  
  <p>When I use <code>IUseFixture&lt;T&gt;</code>, the <code>ClearVisualTestResultFolder</code> function is still being called before every test, so I only end up with one image in the folder.</p>
  
  <pre><code>public class Fixture
  {
      public void Setup()
      {
          ImageHelperTest.ClearVisualTestResultFolder();
      }
  }
  
  public class ImageHelperTest : IUseFixture&lt;EngDev.Test.Fixture&gt;
  {
      public void SetFixture(EngDev.Test.Fixture data)
      {
          data.Setup();
      }
  
      public static void ClearVisualTestResultFolder()
      {
          // Logic to clear folder
      }
  }
  </code></pre>
  
  <p>If I put the <code>ClearVisualTestResultFolder</code> in the constructor, it is also being called once for every test method. I need this just run once before all test methods are executed, how can I achieve this?</p>
  
  <p>If it matters, I use the ReSharper test runner.</p>