title: Can't use a mocked Interface class in Unit Test
body: <p>I'm trying to mock a method in my Unit Test but I can't debug into the the method from the service.</p>
  <p>I have a service with the method DoSomething1 that I want to test :</p>
  <pre><code>public MyService : IMyService
  {
      private IAnotherService _anotherService;
  
      public MyService(IAnotherService anotherService)
      {
          _anotherService = anotherService;
      }
  
      public async Task DoSomething1(string param)
      {
          // Code...
          _anotherService.DoSomething2(string param1, string param2);
          // Code...
      }
  }
  </code></pre>
  <p>This is my testing class :</p>
  <pre><code>[TestClass]
  public class MyServiceTests : TestBase
  {
      private Mock&lt;IAnotherService&gt; _mockAnotherService;
      
      [TestInitialize]
      public void Setup()
      {
          _mockAnotherService = new Mock&lt;IAnotherService&gt;();
      }
  
      [TestMethod]
      public async Task Test_MyService_DoSomething()
      {
          var myService = new MyService(_mockAnotherService.Object);
  
          var result = myService.DoSomething1(param1);
  
          // Some Asserts...
      }
  }
  </code></pre>
  <p>If I now debug it I can get into MyService but I can't debug into</p>
  <pre><code>_anotherService.DoSomething2(string param1, string param2);
  </code></pre>
  <p>And it will fail my tests.</p>
  <p>Using this works but seems to be bad practice :</p>
  <pre><code>var myService = Container.GetInstance&lt;MyService&gt;();
  </code></pre>
  <p>What am I missing?</p>