strategy « Test « JPA Q&A





1. JUnit testing strategy    forum.hibernate.org

I've been having trouble developing a testing scheme in our architecture with Hibernate. We're using Hibernate inside of an EAR and loading the SessionFactory into JNDI at startup of the container. This works perfectly for our Struts web application. We use POJO's to map out our business logic and call them from Struts actions. However, our problem lies in trying to ...

2. strategy of unit tests using Hibernate    forum.hibernate.org

I am starting with unit tests using Hibernate and Ive some question about the right strategy to proceed this tests. At first I researched mock objects and stubs, then I realized that I could instantiate a Hibernate session and access my database, like the code below: The Test Class Code: public class UserDAOHibernateTest extends TestCase{ UserDAO uDAO; ...