Crafting Java with Test-Driven Development, Part 2: Testing Equality

If you’ve been coding in Java for awhile, you know how to write a method to test equality. Why write tests for something you can code in your sleep? Because, as Jeff Langr points out, you’ve probably made plenty of dumb mistakes in your career, either while asleep or while wide awake. It’s simpler and safer to just think of tests as specifications that you always have to code.

5 Comments

  1. 2006-01-23 12:22 am
    • 2006-01-23 7:31 am
      • 2006-01-23 4:42 pm
  2. 2006-01-23 3:41 am
    • 2006-01-23 6:03 am