Review: Pragmatic Unit Testing in C# with NUnit

Posted by Chris on October 04, 2006

I read “Pragmatic Unit Testing in C# with NUnit”:http://www.pragmaticprogrammer.com/starter_kit/utc/index.html this morning. I love the fast-paced to-the-point writing style of “Andy Hunt”:http://www.toolshed.com/blog and “Dave Thomas”:http://blogs.pragprog.com/cgi-bin/pragdave.cgi (and the other authors in their publishing house), and this book was no different than other books in the Pragmatic-series. Most of the contents was stuff that I already knew, both practically (how to) and theoretically (why), but it was still a good read to get another person’s (or two in this case) view of these matters. I also learnt a couple of smaller things about NUnit that I did not know before, such as the [Suite] attribute that can be used to create test suites of test fixtures.

For anyone new to unit testing and TDD (and specifically in C# or at least the .NET world) I would recommend this book along with Kent Beck’s “Test-Driven Development: By Example”:http://www.amazon.com/gp/product/0321146530/. Even more so if you are just starting up a project where you will be using unit tests and have to get up to speed quickly. It starts with a good explanation of why you need unit tests, then proceeds to describe how to do this using NUnit and finally discuss how to write better unit tests and how to incorporate unit tests into a project. All of this in just 176 easy-to-read pages (I finished it in just over an hour, though I could read quite fast since most of it was not new to me).

Trackbacks

Trackbacks are closed.

blog comments powered by Disqus