Next: How to do Unit
Up: Working Backwards with JUnit
Previous: What should a test
Contents
Index
The philosophy of ``working backwards''. (Write the code you want to see without worrying about the infrastructure that supports it.)
- Write one test.
- Compile the test. It should fail (because you haven't implemented anything yet).
- Implement just enough to compile. (Refactor first if necessary.)
- Run the test and see it fail.
- Implement just enough to make the test pass.
- Run the test and see it pass.
- Refactor for clarity and "once and only once".
- Repeat from the top.
Next: How to do Unit
Up: Working Backwards with JUnit
Previous: What should a test
Contents
Index