title: I am trying to write Unit Test in C# for static methods
body: <p>I am learning unit test for c# web application. I am stuck in above mention scenario. I am not sure if I am doing it in correct way. I have FakePath class for unit test. How do I write unit test for static method,Abc.log(), in MSTest?    </p>
  
  <pre><code>public class Abc
  {
      public static void log(string msg)
      {
          //Read on Write on path;
          string path = getPath(new ServerPath());
      }
  
      public static string getPath(IServerPath path)
      {
          return path.MapPath("file.txt");
      }
  }
  
  interface IServerPath()
  {
      string MapPath(string file);
  }
  
  class ServerPath : IServerPath
  {
      string MapPath(string file)
      {
          return HttpContext.Current.Server.MapPath(file);
      }
  }
  
  class FakeServerPath : IServerPath
  {
      string MapPath(string file)
      {
          return @"C:\"+file;
      }
  }
  </code></pre>