Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It seems that all of the newer ASP.NET MVC books have at least one chapter on unit testing.</p> <p>I have recently completed Steve Sanderson's book <a href="http://blog.codeville.net/2009/04/29/now-published-pro-aspnet-mvc-framework-apress/" rel="noreferrer">Pro ASP.NET MVC Framework</a> and I thought the author placed a strong emphasis on unit testing. The book doesn't have a dedicated chapter on unit testing, but just about every chapter has relevant sections or call-outs/sidebars that deal with testing routing (inbound and outbound), controllers, repositories, model binders, etc. If I remember he uses the <a href="http://www.nunit.org/index.php" rel="noreferrer">nUnit</a> and <a href="http://code.google.com/p/moq/" rel="noreferrer">Moq</a> libraries in great detail. You can preview parts of his book on Google Books : <a href="http://books.google.com/books?id=Xb3a1xTSfZgC" rel="noreferrer">Pro ASP.NET MVC Framework</a> or order it from <a href="http://www.apress.com/book/view/1430210079" rel="noreferrer">Apress</a> (their eBooks are reasonably priced but password protected with your email address which is sort of a pain for me) or from <a href="http://rads.stackoverflow.com/amzn/click/1430210079" rel="noreferrer">Amazon</a>.</p> <p>I haven't seen any plans for a book solely on ASP.NET MVC unit testing, so you're going to probably have to stick to blogs or with whatever content you can find in the upcoming ASP.NET MVC books (like I said, it seems that all of them cover unit testing to varying degrees).</p> <p>Some of the books that I know of:</p> <p><a href="http://www.wrox.com/WileyCDA/WroxTitle/productCd-047043399X.html" rel="noreferrer">Wrox: Beginning ASP.NET MVC 1.0</a> --- Has a sample chapter on testing for download <a href="http://p2p.wrox.com/book-beginning-asp-net-mvc-1-0-isbn-978-0-470-43399-7/74180-free-chapter-9-testing-asp-net-mvc-applications-preview.html" rel="noreferrer">here</a>.</p> <p><a href="http://www.manning.com/palermo/" rel="noreferrer">Manning: ASP.NET MVC in Action</a> --- Doesn't have an explicit chapter on testing, but if you download the <a href="http://code.google.com/p/codecampserver/" rel="noreferrer">CodeCampServer</a> reference application you will find a ton of unit, integration, and regression tests.</p> <p><a href="http://www.wrox.com/WileyCDA/WroxTitle/Professional-ASP-NET-MVC-1-0.productCd-0470384611.html" rel="noreferrer">Wrox: Professional ASP.NET MVC 1.0</a> --- Has unit tests in the <a href="http://haacked.com/archive/2009/03/10/chapter-one-pro-aspnetmvc.aspx" rel="noreferrer">NerdDinner</a> sample application and a dedicated chapter on testing. Testing Guru Roy Osherove (author of The <a href="http://www.manning.com/osherove/" rel="noreferrer">Art of Unit Testing</a>) reviews the NerdDinner tests <a href="http://weblogs.asp.net/rosherove/archive/2009/03/20/test-review-1-nerddinner.aspx" rel="noreferrer">here</a>.</p> <p><a href="http://www.packtpub.com/asp-net-model-view-controller-1-0-quickly/book" rel="noreferrer">Packt: ASP.NET MVC 1.0 Quickly</a> --- Has a chapter on unit testing and the author has a pretty good blog that talks about various ASP.NET MVC issues including <a href="http://blog.maartenballiauw.be/post/2008/03/19/ASPNET-MVC-Testing-issues-Q-and-A.aspx" rel="noreferrer">testing</a>.</p> <p><a href="http://www.informit.com/store/product.aspx?isbn=0672329980" rel="noreferrer">Sams: ASP.NET MVC Framework Unleashed</a> --- Browsing the <a href="http://www.informit.com/store/product.aspx?isbn=0672329980" rel="noreferrer">Table of Contents</a> for the book reveals a fair amount of content dedicated to testing (mocking, TDD, etc). You can check out the author's <a href="http://stephenwalther.com/blog/category/9.aspx" rel="noreferrer">blog</a> for sample content from the upcoming book and other ASP.NET MVC and TDD related posts. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload