Private methods are for hiding implementation and we don’t want to test implementation details when we do TDD, that’s better achieved as part of a QA effort, if needed.You can read the complete article here.
Good unit tests are the backbone of successful TDD. Keep the following in mind as you write unit tests:
- Each unit test should be independent.
- Each unit test should test one aspect or behavior and document the expected behavior.
- Each unit test should not verify too much functionality.
- Each unit test should not be dependent on interface.
Have a nice day!
You can see the original article at java Dzone
No comments:
Post a Comment