Spring/Hibernate/Junit example of testing DAO against HSQLDB
问题 I'm working on trying to implement a JUnit test to check the functionality of a DAO. (The DAO will create/read a basic object/table relationship). The trouble I'm having is the persistence of the DAO (for the non-test code) is being completed through an in-house solution using Spring/Hibernate , which eliminates the usual *.hbm.xml templates that most examples I have found contain. Because of this, I'm having some trouble understanding how to setup a JUnit test to implement the DAO to create