title: Adding a shim to a static method
body: <p>I've got some legacy code to add unit testing to. I can add shims where necessary to classes that need instanciating, but some of the code uses static classes. I can't add a shim properly.</p>
  
  <p>for example (simplified for clarity):</p>
  
  <pre><code>public static class DBHelper
      {
          public static ObservableCollection&lt;Run&gt; GetRuns()
          {
              ObservableCollection&lt;Run&gt; retval = new ObservableCollection&lt;Run&gt;();
  
              using (AriaEntities DBC = new AriaEntities())
              {
                  var res = DBC.Runs.OrderByDescending(x =&gt; x.Run_Number).Take(100).ToList();
  
                  retval = new ObservableCollection&lt;Run&gt;(res);
              }
  
              return retval;
          }
      }
  </code></pre>
  
  <p>I want to shim this method. if it was non static, I'd use:</p>
  
  <pre><code> using (ShimsContext.Create())
   {
        ShimDBHelper.AllInstances.GetRuns = (i) =&gt; { return FakeRunList(); };
  
        ...
   }
  </code></pre>
  
  <p>But with a static I get "'DBHelper': static types cannot be used as parameters". If I remove the parameter, I get told that the delegate doesn't take 0 arguments.</p>
  
  <p>Whats the syntax for a static class, if there is one? </p>