title: How to mock non virtual methods?
body: <pre><code>[TestMethod]
  public void TestMethod1()
  {
      var mock = new Mock&lt;EmailService&gt;();
      mock.Setup(x =&gt; x.SendEmail()).Returns(true);
      var cus = new Customer();
      var result = cus.AddCustomer(mock.Object);
      Assert.IsTrue(result);
  }
  
  public class Customer
  {
      public bool AddCustomer(EmailService emailService)
      {
          emailService.SendEmail();
          Debug.WriteLine("new customer added");
          return true;
      }
  }
  
  public class EmailService
  {            
      public virtual bool SendEmail()
      {
          throw  new Exception("send email failed cuz bla bla bla");
      }
  }
  </code></pre>
  
  <p>The <code>EmailService.SendEmail</code> method must be virtual to mock it. Is there any way to mock non virtual methods?</p>