title: Mocking MailController with ActionMailer.net using Moq 3
body: <p>I'm new to Moq, so any help would be great. I keep getting a null reference error in my code when I'm trying to set up a test. Here is the line of code where I'm getting the error below.</p>
  
  <pre><code>_iMailController.RequesterEmail(model).Deliver();
  </code></pre>
  
  <p>Here is what my test looks like:</p>
  
  <pre><code> _mockMailController = new Mock&lt;IMailController&gt;();
  
   mockMailController .Setup(x =&gt; x.RequesterEmail(new Model())).Returns(**new EmailResult()**);
  </code></pre>
  
  <p>The bold part is where I'm stuck at. It takes 7 parameters and dont know what to put to fake out the EmailResult.</p>