I've added database functionality using hibernate to a system which was in memory up to this point. When all the data was it memory I was able to use Junit which restored the original data after each test. Is there a way to achieve the same result with the new hibernate addition? By "the same result" I mean start with the database at its original state, do test which can alter the database, and restore the database to its original posion.
Up until now my ideas are:
- In memory database (which is an hibernate feature) but that won't allow me to use my actual data.
- Add "testing flag" to me DOA won't commit the changes if set.
I am sure there is a better solution, but I haven't found anything better yet.
Aucun commentaire:
Enregistrer un commentaire