Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The Boy Scout rule:
- Leave the camp cleaner than before you found it. We have to clean the code, and keep it in clean state!
- This can be achieved with unit tests.
- (Hollywood principle: Don't call us, we will call you.)
- UNIT TESTS:
- - We fix the parameters and the expected result of the method we are going to test.
- - We call this method and check whether the actual result is the same as the expected one.
- TDD: Test-driven development (red-green-red-...)
- 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