title: Unit testing the Controller with dependecny injection
body: <p>We have a controller,which has a contructor accepting another class object.
  For example,</p>
  
  <pre><code>ABCController(IXyz obj){this.xyz = obj;}
  </code></pre>
  
  <p>Now,in the unit test,while instantiating the conroller,we do something like this:</p>
  
  <pre><code>ABCController controller = new ABCController (new Xyz());
  </code></pre>
  
  <p>We are injecting the dependency from the unit test project and after this we are able to test all the methods of the Controller.</p>
  
  <p>Now the big question is,what is the standard way of instantiating the controller rather than supplying/injecting the dependency?</p>
  
  <p>I agree that this is the reason there are plenty of mocking/testing frameworks exists.But do we need to adopt to a new framework altogther just to avoid injecting the dependency? or injecting is the best trade off rather than adopting a new framework altogether?</p>
  
  <p>Please advise/clarify.</p>