title: Synchronize multiple unit test assemblies
body: <p>I have assembly <code>Common</code> with class <code>UnitTestSemaphoreLocker</code>:</p>
  
  <pre><code>public static class UnitTestSemaphoreLocker
  {
      private static readonly SemaphoreSlim Semaphore = new SemaphoreSlim(1, 1);
  
      public static void Lock([NotNull] Action work)
      {
          if (work == null) throw new ArgumentNullException(nameof(work));
  
          Semaphore.Wait();
          try
          {
              work();
          }
          finally
          {
              Semaphore.Release();
          }
      }
  
      public static async Task LockAsync([NotNull] Func&lt;Task&gt; worker)
      {
          if(worker == null) throw new ArgumentNullException(nameof(worker));
  
          await Semaphore.WaitAsync();
          try
          {
              await worker();
          }
          finally
          {
              Semaphore.Release();
          }
      }
  }
  </code></pre>
  
  <p>I have two unit test assemblies, lets say <code>TestAssemblyA</code> and <code>TestAssemblyB</code></p>
  
  <p>Unit tests from both assemblies use one resource, that support only one call per time. 
  So i want yo use my <code>UnitTestSemaphoreLocker</code> to lock unit test and make them executing one by one:</p>
  
  <pre><code>[TestMethod]
  public void ConstructionTest()
  {
      UnitTestSemaphoreLocker.Lock(() =&gt;
      {
         //test body
      });
  }
  </code></pre>
  
  <p>It works perfectly fine for tests in one assembly, but seems like two of them creating own instances of my common static <code>UnitTestSemaphoreLocker</code> class.</p>
  
  <p>Is there any way to sync unit test from two assemblies? Meanwhile part of them must use <code>async/await</code>.</p>