Learn how to improve your C# coding skills using unit testing. Despite it's name, unit testing is really a coding technique, not a testing technique. Unit testing is done by programmers, for programmers. It's primarily for our benefit: we get improved confidence in our code, better ability to make deadlines, less time spent in the debugger, and less time beating on the code to make it work correctly.This book shows how to write tests, but more importantly, it goes where other books fear to tread and gives you concrete advice and examples of what to testthe common things that go wrong in all of our programs. Discover the tricky hiding places where bugs breed, and how to catch them using the freely available NUnit framework. It's easy to learn how to think of all the things in your code that are likely to break. We'll show you how with helpful mnemonics, summarized in a handy tip sheet (also available from our www.pragmaticprogrammer.com website).With this book you will:
- Write better code, and take less time to write it
- Discover the tricky places where bugs breed
- Learn how to think of all the things that could go wrong
- Test individual pieces of code without having to include the whole project
- Test effectively with the whole team
|Publisher:||Pragmatic Programmers, LLC, The|
|Series:||Pragmatic Programmers Series|
|Product dimensions:||7.48(w) x 8.90(h) x 0.57(d)|
About the Author
Andy Hunt is a programmer turned consultant, author and publisher. He co-authored the best-selling book “The Pragmatic Programmer”, was one of the 17 founders of the Agile Alliance, and co-founded the Pragmatic Bookshelf, publishing award-winning and critically acclaimed books for software developers.
Dave Thomas, as one of the authors of the Agile Manifesto, understands agility. As the author of "Programming Ruby," he understands Ruby. And, as an active Rails developer, he knows Rails.
Most Helpful Customer Reviews
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. 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. 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. 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.