Pragmatic Unit Testing in C# with NUnit, 2nd Edition

Pragmatic Unit Testing in C# with NUnit, 2nd Edition
Price: $29.95 USD
The NIST estimates that poor testing costs the US economy $60 billion annually. This book gives teams straightforward and proven ways to introduce unit testing into their process, resulting in higher quality and fewer bugs.

All over the world, software teams are using unit testing both to verify their code and as a way of helping them design better code. This book is unique in the way it covers two aspects: showing developers both how to test and helping them determine what to test.

New in the second edition:

  • Updated for NUnit 2.4 (.NET 2.0 and Visual Studio 2005)
  • More assert methods
  • New String and Collection assertion support
  • Better support for multiple-platform development
  • Higher-level setup and teardown fixtures
  • Whole new chapter on extending NUnit
  • and more!

Author: Andy Hunt
Author: Dave Thomas
Author: Matt Hargett
Publisher: Pragmatic Bookshelf
Customer Reviews
  • A Book Full of Practical Advice on Unit Testing
    The book is packed with practical advice on unit testing. Why should you do unit testing, what do you need to know to write good tests, how do you know if you're writing good tests, how can unit tests not only improve your code, but also your design, can unit tests doom a project (if not done right) --- you'll find answers to all of these questions and more. The authors also give numerous short code examples that help solidify the concepts. You'll also find extensive references and links to web-sites where appropriate. The authors' writing style is fluid. If you enjoy reading good technical books, you'll read this like a novel!
  • Great introduction to writing unit test in C#
    This is a great introduction to writing unit tests in C# with NUnit. The authors do a good job of explaining why unit tests should be created, how having unit tests are better than not having unit tests, and what exactly should be coded for in a unit test. The book is well-written, easy to follow, and includes helpful guidelines for things that might be confusing to developers. <br /> <br />The real strength of this book is not the author's approach to writing unit tests, but rather they clearly illustrate what exactly should be tested in a unit test. The authors show how adhering to the guidelines they set forth results in unit tests that are well-written and fail at appropriate times. The authors then generalize this to some extent and provide an excellent discussion on the properties of a good unit test. <br /> <br />My favorite section of the book was actually one of the appendices. In the first appendix, the authors go through a list of gotchas--both in writing unit tests in general and specific to unit tests in C#. This is a very short discussion (only 6 pages), but they identify some issues I've seen with poorly written unit tests. <br /> <br />This is a great book as an introduction to writing unit tests. The authors clearly explain why unit tests should be written, they show clearly what should be tested in a unit test, and they describe some of the problems that have been avoided by writing intelligent unit tests. <br />
  • The time is NOW
    You keep hearing about it. <br />"Unit Testing, Unit Testing, Unit Testing" <br />The time is now. Stop talking about and start becoming a more responsible developer. <br />This book takes you through the scenarios. Well written, and easy to get going. <br />This book has been the key ingrediant to get other developers at my company involved with NUnit testing. <br /> <br />NUnit is freely available. If you have VS2005Pro, then plugging in NUnit make the most sense.
Results provided by Amazon