Click here to Skip to main content
15,881,866 members
Articles / Web Development / ASP.NET

MVC Test Driven Development: Session Variables

Rate me:
Please Sign up or sign in to vote.
4.88/5 (6 votes)
12 Aug 2011CPOL2 min read 50.6K   20  
When you write a controller which is unit testable, it would be better to avoid any dependency to the HttpContext to make things easier. If you are using any of the session variables in your controller, it will make your controller difficult to test.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
India India
Russell Aboobacker is a Software Engineer from India, Currently working in Cognizant, Bangalore as Software Architect. He Enjoys Coding and Sharing his Experiences with the Colleagues and Friends.When he is not coding he enjoys spending time with his Family.

If you have any suggestions / Ideas , Share it With me. arusselkm@yahoo.com

Comments and Discussions