samedi 30 juin 2018

Should I create an interface for every class to make my code testable (unit testing)

I'm trying to learn how to create valuable unit tests. In each tutorial I saw people create interfaces for every dependency to create a mock.

Is it mean that I should always create an interface for every class I have in my project? I don't know is it a good or a bad idea but every time I see a rule with "always" I get suspicious.

Aucun commentaire:

Enregistrer un commentaire