title: How to test a method with local instance?
body: <p>Imagine the following class:</p>
  
  <pre><code>class ClassToBeTested{
      private IClassA a;
      private IClassB b;
  
      public ClassToBeTested(IclassA a, IClassB b)
      {
          this.a = a;
          this.b = b;
      }
  
      public void MethodToBeTested()
      {
           //...
           var c = new ClassC(a, b);
           c.doSomeThing();
           //...
      }
  }
  </code></pre>
  
  <p>And I want to do some unit tests for <code>MethodToBeTested</code>. But I can't find a way to moq <code>ClassC</code> object without doing dependency injection. I don't want to change the method signature and pass <code>ClassC</code> as parameter. </p>
  
  <p>Is there way to unit test this method?</p>