Guest User

Untitled

a guest
Nov 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. TDD as if you meant it
  2. ----------------------
  3.  
  4. 1. Write exactly one new test. It should be the smallest test which seems to point in the direction of a solution.
  5. 2. Run the test to make sure it fails
  6. 3. Make the test from (1) pass by writing the least amount of implementation code you can IN THE TEST METHOD.
  7. 4. Refactor to remove duplication or otherwise as required to improve the design. Be strict about the refactorings.
  8. Only introduce new abstractions (methods, classes, etc) when they will help to improve the design of the code.
  9. Specifically:
  10. 4.1 ONLY Extract a new method if there is sufficient code duplication in the test methods.
  11. When extracting a method, initially extract it to the test class (don't create a new class yet).
  12. 4.2 ONLY create a new class when a clear grouping of methods emerges and when
  13. the test class starts to feel crowded or too large.
  14. 5. Repeat the process by writing another test (go back to step #1).
Add Comment
Please, Sign In to add comment