The art of unit testing

with examples in .NET

296 pages

English language

Published April 19, 2009 by Manning.

ISBN:
978-1-933988-27-6
Copied ISBN!

View on OpenLibrary

(6 reviews)

2 editions

An OK introduction to unit testing, with major caveats

Reading this book was a mixed experience. While it addresses an important and often neglected topic, several aspects left me unimpressed and somewhat concerned.

The author presents some dubious techniques, such as using a glorified service locator singleton as an alternative to constructor injection (p.64, 2nd ed.), which would outright break parallel testing, without mentioning it. In fact, the book ignores the need for parallel testing altogether, presenting patterns which are not thread-safe as best practice techniques.

Some of the presented methods of creating testing seams in the code (such as using a service locator singleton, or exposing overridable methods solely for the purpose of testing - dubbed "Extract and Override") are unlikely to produce maintainable code, but the book makes no distinction between best practices and academic debate. Perhaps some of them were meant only for legacy projects, but that was not stated in the book. What's worse, some …

avatar for gagliardi_vale

rated it

avatar for shaun

rated it

avatar for piotr

rated it

avatar for madklowns

rated it

avatar for Lunartech

rated it

Subjects

  • Computer software -- Testing
  • Computer software -- Development
  • Microsoft .NET