I started to learn TDD and I read about mock and stub. Then I found myself in the situation where my method is getting a data from a database.
Now I want to know actually 2 things to clear my doubt. 1) If i have a method that fetch the data from the database can i verify that data to be equal with the expected return. So in order to simulate that i am getting the expected data from the database what should i do?
2) what would be good example of using Mock and stub?
Aucun commentaire:
Enregistrer un commentaire