Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the test tool's fixture capabilities (i.e., cleanup/tear-down methods) to perform any required cleanup and reset the test class to a known state instead of using finally blocks.

Tests Before Changes

Before changing or refactoring existing code, always make sure that tests exist and pass first.

If not, write unit test for the code that is about to be changed or refactored.

When dealing with legacy code that would be difficult to unit test, consider writing component tests instead. Those should be easier to write and make it easier and safe to refactor or change the code as needed.

Smells

Tests Difficult to Name

...