title: NSubstitute Mock static class and static method
body: <p>I'm new at unit testing, and I'm trying to mock a static method in a static class. I already read that you can't do that, but I was looking a way to work around that.</p>
  <p>I can't modify the code, and making the same function without being static is not an option because they check the code coverage of the test, and I need at least 90%.<br />
  I already tried to mock the variables that it uses but it doesn't work.</p>
  <pre><code>public static class MyClass
  {
      public static response MyMethod(HttpSessionStateBase Session, 
          otherVariable, stringVariable)
      {
          //some code
      }
  }
  
  public ActionResult MyClassTested()
  {
      var response = MyClass.MyMethod(Session);
      //more code
  }
  </code></pre>
  <p>My problem is that this method is inside a controller that declares a var with the response, and according to that redirects the user.</p>