Advertisement
csaki

progtech gyak 3.

Feb 27th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. The Boy Scout rule:
  2. Leave the camp cleaner than before you found it. We have to clean the code, and keep it in clean state!
  3. This can be achieved with unit tests.
  4. (Hollywood principle: Don't call us, we will call you.)
  5.  
  6. UNIT TESTS:
  7. - We fix the parameters and the expected result of the method we are going to test.
  8. - We call this method and check whether the actual result is the same as the expected one.
  9.  
  10. TDD: Test-driven development (red-green-red-...)
  11. 1st we write the test THEN we write the method (so we could write method that is easily testable [2 kind of brains: programmer and tester (programmer: I should write a nice code, tester: I should write a testable code (But how to test it?!))])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement