title: Usage of ThreadStatic (Unit Testing)
body: <p>I have written the following to stub a Singleton for the purpose of unit testing. </p>
  
  <pre><code> public static class LocalisationSetter
      {
          [ThreadStatic]
          private static CultureInfo _cultureInfo;
  
          public static void Set(CultureInfo cultureInfo)
          {
              _cultureInfo = cultureInfo;
  
              Localisation.Current.Culture = _cultureInfo; // Setting The singleton.
          }
      }
  </code></pre>
  
  <p>In my test I do something like below:</p>
  
  <pre><code>LocalisationSetter.Set(new CultureInfo("fr-FR"));
  </code></pre>
  
  <p>The above method just seems little "dirty"... </p>
  
  <p>Just wondered if there is potentially a better way. I need to make sure the changes to "Localisation" is only visible to the thread.</p>