How would you design a service class, that might use a data repository beneath doing TDD? For example, if we want to define an interface UserStorageService and UserStorageService#save(User user) implementation that saves user to some database through jpa repository interface? Should I mock specific save or saveAndFlush or similar JpaReposiotory's methods if I don't even know which one's I will be actually calling?
Aucun commentaire:
Enregistrer un commentaire