Hi,
I have a simple question for folks who have strong experience with using Hibernate. My question relates to best practices in terms of
unit testing Hibernate code, particularly when the DAO
pattern is used. In general, should unit tests be written just for the DAOs, just for the entities, or for both?
We are beginning a project, and I want to ensure that we provide good test coverage, while at the same time not spending more time than we need. I'd imagine that one answer to my question is "if you want complete coverage, then test the entity and the DAO layer", but I'm curious if, in practice, anyone has found it more efficient to omit tests for one or the other.
Thanks in advance!