O'Reilly logo

The Art of Unit Testing: with Examples in .NET by Roy Osherove

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test Review Guidelines

A more elaborate and always up-to-date version of these guidelines can be found at http://www.artofunittesting.com/Test_Review_Guidelines

Reviewing General Tests

  • Make sure the test does not contain logic or dynamic values 178
  • Make sure the test tests one thing only 179
  • Make sure that unit tests are separated from integration tests 180
  • Check coverage by playing with values 180
  • Make sure that testing private or protected methods is not the norm (public is always better) 182
  • Make sure there is little to no duplication of code in the tests 184
  • Make sure setup and teardown methods are not abused 188, 214
  • Make sure tests are completely isolated and repeatable 191
  • Make sure that most tests only have one assert 198
  • Make sure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required