title: xUnit framework: Equivalent of [TestFixtureSetUp] of NUnit in XUnit?
body: <p><strong>What is xUnit's equivalent of NUnit's <code>[TestFixtureSetUp]</code>?</strong> </p>
  
  <p>We have explored and found that <code>IUseFixture&lt;T&gt;</code> is the equivalent of <code>[TestFixtureSetUp]</code>, but it's not working as expected. </p>
  
  <p>As we have explored (in case of NUnit), we found that <code>[TestFixtureSetUp]</code> marked methods for code to be executed only once before all test in the fixture have been run. In xUnit, the equivalent of <code>[TestFixtureSetUp]</code> is <code>IUseFixture&lt;T&gt;</code> as we have explored, but during testing, we found that the <code>SetFixture</code> method of <code>IUseFixture</code> is being called before every test (not only once for all methods).</p>
  
  <p>Please let us know how can we achieve the above in xUnit. Also correct us if we are misunderstanding something. Thanks.</p>