title: Mocking ApiController
body: <p>I'm trying to test a WebApi Controller that I have made. I have tried to use dependency injection to make the testing easier. Though its actually having the opposite effect.</p>
  
  <p>I currently have a controller that takes a repo interface in its constructor. The repo interface takes a DbContext interface in its constructor too. Am i right in thinking that I need to mock the DbContext, and passed that mocked context as an argument when mocking the repo and then pass that mocked repo into the actual implementation of the controller that I am testing?</p>
  
  <p>I am using Moq and NUnit. </p>
  
  <p>Thanks</p>