title: MVC 3: Test controllers VS integration tests
body: <p>I started with MVC quite recently because I heard that the major advantage of MVC is that it makes the application unit testable. After writing first unit tests I saw that it is not always simple to test controllers that have a lot of logic inside (send confirmation emails, use Session, context and other ASP Net statics). It takes me more time to write the unit test than the functionality and I am not convinced that this is useful. </p>
  
  <p>I am tempted to move the business logic into a "Service" layer that eliminates of all ASP Net statics and which can be easily tested. Then to use Selenium for integration tests in order to test the whole functionality. </p>
  
  <ol>
  <li><p>Did you got into the situation when testing an action is very complex (especially mocking the input and setting up environment)?</p></li>
  <li><p>Did you find a good approach to have business logic in controllers. Or you found it better to use services and controllers code just relay on services calls?</p></li>
  <li><p>In my opinion testing a controller is more equivalent to integration tests than to unit tests. What do you think about this?</p></li>
  <li><p>Do you think that unit testing controllers has any advantage over integration tests?</p></li>
  </ol>