title: Testing private method with Moq doesn't work
body: <p>I am using Moq and I am sort of new to it.
  I need to test a private method.</p>
  
  <p>I have 2 assemblies:</p>
  
  <pre><code>CustomerTest.dll
  CustomerBusiness.dll
  </code></pre>
  
  <p>So
  CustomerTest dll has a class as follows:</p>
  
  <pre><code>[TestFixture]
  public class CustomerTestFixture
  {
      var customerMock=new Mock&lt;ICustomer&gt;()
      customerMock.Protected().Setup&lt;bool&gt;("CanTestPrivateMethod").Returns(true);
  
     etc...
  }
  </code></pre>
  
  <p>CustomerBusiness.dll has</p>
  
  <p>public interface ICustomer
     {
         void Buy();
      }</p>
  
  <pre><code>public class Customer:ICustomer
  {
      public void Buy()
      {
          etc...
      }
  
      protected virtual bool CanTestPrivateMethod()
      {
          return true;
      }
  
  }
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>System.ArgumentException : Member ICustomer.CannotTestMethod does not exist.
  at Moq.Protected.ProtectedMock`1.ThrowIfMemberMissing(String memberName, MethodInfo method, PropertyInfo property)
  at Moq.Protected.ProtectedMock`1.Setup(String methodOrPropertyName, Object[] args)
  </code></pre>
  
  <p>I have also added <code>[assembly: InternalsVisibleTo("CustomerTest.CustomerTestFixture")</code>
  but with no difference!</p>
  
  <p>What Am I doing wrong. I know my Interface has not such a method.That is the point as my method must be private. Can you help with an example?</p>