So, I've seen a video about TDD, where the presenter said, that you should unit test only the part of the class, what is give something out for the external world. He mentioned this is good, since this approach makes sure the class is keeping the "contract", so it's delivery its duty, but you are free to refactor the logic behind it.
I'm a bit confused here guys,because I learned that unit test should NOT depend from the outter world. Okay, I understand this is not a dependency, but why not testing the inside logic? Any idea? Please feel free to add as an answer!
Aucun commentaire:
Enregistrer un commentaire