Maven, CDI, JUnit, JPA. Would like to run tests against HSQLDB

816 Views Asked by At

I've written a JEE6 application using CDI and JPA. My tests are written in JUnit. I'd like to run the database tests against an in-memory HSQLDB database in order to make sure my JPQL (which I consider 'code') is tested. My motivation is that that changing a JPQL statement with a mocked out EntityManager would lead to successful test execution of the code unit.

I'm using Guice and Jukito to run other (non-jpa) tests.

Does anyone have an example for this? I've tried looking around and I've yet to find a good example or framework project to handle this.

1

There are 1 best solutions below

3
LightGuard On BEST ANSWER

Arquillian persistence? DBUnit?