test driven development code example
Example: test driven development
Write tests. Run the code: it fails.
because there is no code. Write code.
Run the tests again: they will pass. Refactor, and re-do.
Write tests. Run the code: it fails.
because there is no code. Write code.
Run the tests again: they will pass. Refactor, and re-do.