Rules of TDD

  1. You are not allowed to write alien production code before writing failing tests.
  2. You are not allowed to write more test code than is required to fail.
  3. You are not allowed to write more code than is required to pass the failing test.