-
Notifications
You must be signed in to change notification settings - Fork 0
Code Exercise
Thomas Czogalik edited this page Jul 15, 2019
·
3 revisions
- codekata.com
- clean code developer school
- code wars
-
tdd as if you meant it
- Write one new test: The smallest you can think of that seems to point in the direction of a solution.
- Watch it fail
- Make the test pass by writing the least implementation code you can in the test method
- Refactor as required. To create new structure that's not test code,
apply these steps very strictly.
-
methods:
- (preferred)
Extract Method
to create a new method in the test class - (if necessary) Move code into an existing method
- (preferred)
-
types:
- create classes only to provide a destination for
Move Method
. - Populate classes by moving definitions from tests, not the other way round.
- create classes only to provide a destination for
-
methods:
- The person not typing makes sure that these rules are being followed exactly.