In my new project, i decided to try with TDD. And in very beginning I encountered a problem. First thing that i want to do in my application is to give ability to read data from data source. For this purpose, I want to use repository pattern. And now:
- If test are for real implementation of repository interface, I will be testing class that has access to database, and I know that i should avoid that.
- If test are for not real implementation of repository pattern, I Will be testing well... just mock. There will be no any piece of production code tested in those unit tests.
I'm thinking about this from two days and still cannot come up with any reasonable solution. What i should do?
Aucun commentaire:
Enregistrer un commentaire