Book Review – Pragmatic Unit Testing in C# with NUnit

Date Published: 15 June 2005

Book Review – Pragmatic Unit Testing in C# with NUnit

I recently finished reading Pragmatic

Unit Testing in C# with NUnit. It’s a good overview of unit testing

and I picked up a few things from it. I’ve previously read several of the

books referenced in this one, including Kent Beck’s XP book (Extreme

Programming Explained). I also have Pragmatic

Version Control, which I haven’t had a chance to look at yet.

I learned a few new acronyms from this book – the authors seemed to like

using them as memory aids. A good design principal, Don’t Repeat Yourself,

or DRY, was my favorite. Others included Right BICEP, A-TRIP, and CORRECT

for What To Test, What makes a Good Test, and what to look for in Boundary

Conditions, respectively. The book includes a summary page that is sort of

a Cliff’s Notes version of the book, which is actually pretty handy (especially

if you’re reviewing the book).

One of my primary reasons for checking out this book was to learn more about

mock objects, since I’ve never gotten into using them. There is a good

chapter on them, I thought (coming from zero real experience), which includes

some coverage of a few open source tools like NMockand DotNetMock. It at

least succeeded in making me want to check out mock objects some time.

Overall the book was a fairly quick read, the authors’ tone was comfortable

and in good English. I didn’t find any errors in the code listings.

So, as an intro to unit testing, I think this book does a good job. It’s

only 150 pages long, so it’s not a huge tome. It’s something you can throw

in your bag and read on an airplane, and perhaps finish depending on how far

you’re going and how fast you read…

Steve Smith

About Ardalis

Software Engineer

Steve is an experienced software architect and trainer, focusing currently on ASP.NET Core and Domain-Driven Design.


Copyright © 2020