- You may not write production code until you have written a failing unit test.
- You may not write more of a unit test than is sufficient to fail, and compiling is not failing.
- You may not write more production code than is sufficient to pass the currently failing test.
Test code is just as important as production code. It is not a second-class citizen. It requires thought, design, and care. It must be kept as clean as production code.