title: How to access a Static Class Private fields to unit test its methods using Microsoft Fakes in C#
body: <p>I have the below static class and a method in it which I need to unit test. I am able to  But this method has the if condition which uses a Boolean private variable and if the value of it is false then it executes the steps in that if condition. </p>
  
  <pre><code>public static class Logger
  {
      private static bool bNoError = true;
      public static void Log()
      {
          if (!bNoError)
          {
              //Then execute the logic here
          }
          else
          {
              //else condition logic here
          }
      }
  } 
  </code></pre>
  
  <p>Is there a way I can set the private field bNoError value to true so that I can have one test method which tests the logic in if condition.</p>