title: Unit Testing ASP.Net MVC 4 apps thoroughly
body: <p><em>I realize this is a duplicate of about 20 different posts, but none of them are specific to MVC4, and none that I've seen really answer all of my questions.</em> So far my first foray into the world of TDD has been frustrating to say the least. Most of what I've tried to do seems incompatible with MVC 4 or next to impossible without using poorly documented third party libraries I don't quite understand yet.</p>
  
  <p>What I want to be able to do, is write a tests that will test my Controller Actions, The Model they're passing and <em>The View</em> the action is sending the model to. I want to test if the view exists, I want to test if the model being passed is the right type for the view, I'd like some way to test if it will process properly. I also want to be able to test my routes. And testing Authentication filters?</p>
  
  <p>I want a way to unit test ASP.Net MVC that will leave very little to chance.</p>
  
  <p>Testing the Model output of an Action seems easy enough, but testing the views has been next to impossible.</p>
  
  <p>So here's my list of questions: </p>
  
  <ol>
  <li><strong>Once I test the action and get the action result, how do I test to see if the view it wants exists?</strong></li>
  <li><strong>How do I test my routes?</strong></li>
  <li><strong>How can I test to be sure my views are being processed properly?</strong></li>
  <li><strong>What is really "best practice" for THOROUGH unit testing of ASP.Net MVC 4?</strong></li>
  <li><strong>How do I unit test forms authentication?</strong></li>
  <li><strong>How do I unit test Action Filters?</strong></li>
  </ol>
  
  <p>I'd prefer to use the built in Visual Studio test projects, but if I must use NUnit, I must. I just need to make sure it gets done properly.</p>
  
  <p>Thank you in advance for your responses.</p>
  
  <p>EDIT: I also couldn't get NUnit working with my MVC4 app because of some incompatibly with the version of .NET one of the assemblies was compiled in.</p>