title: NUnit pass data from OneTimeSetUp to all tests in that fixture
body: <p>In NUnit, I am attempting to initialize a variable during the test fixture's <code>OneTimeSetUp</code> and reference that variable in all test cases under that fixture. </p>
  
  <p>The <code>OneTimeSetUpAttribute</code> is applied to a function in a file called <code>Initializer.cs</code>, where I initialize a new instance of a Selenium <code>IWebDriver</code> named <code>driver</code> and apply some common configuration options. My test cases are defined in <code>TestCases.cs</code> in the same namespace and directory as <code>Initializer.cs</code>. Is it possible to somehow pass the <code>driver</code> variable to the test cases defined in <code>TestCases.cs</code>? If not, then how should I address initializing a new instance of <code>IWebDriver</code> on each new test run without having to initialize it during the <code>SetUp</code> of each test case file I add? See the code below.</p>
  
  <p>I am using Visual Studio Test Explorer to execute the tests.</p>
  
  <p><strong>Initializer.cs</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>namespace AutomatedTests
  {
      [SetUpFixture]
      public class Initializer
      {
          IWebDriver driver = null;
  
          [OneTimeSetUp]
          public void Before()
          {
              ChromeOptions options = new ChromeOptions();
              // some initial browser configuration here
  
              driver = new ChromeDriver(".");
          }
  
          [OneTimeTearDown]
          public void After()
          {
              driver.Close();
          }
      }
  }
  </code></pre>
  
  <p><strong>TestCases.cs</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>namespace AutoamtedTests
  {
      public class TestCases
      {
          [Test]
          public void AutomatedTest()
          {
              // is it possible to reference 'driver' here?
          }
      }
  }
  </code></pre>