class « Test « JPA Q&A

1. hibernate - junit noob - class variable value lost between 2 test methods

... I got a simple integration test going and all test methods run fine ... BUT... I set up a class var

int tempId;
for use by the following methods. testSaveTag() sets the ...

2. JPA Hibernate Maven testing --> unknown class

I'm trying to run a simple dataImport class which is using JPA and Hibernate. If I run my class, i always have the following error:

Exception in thread "main" java.lang.IllegalArgumentException: Unknown entity: ...

3. Unit-testing hibernate classes with JUnit

I like to unit-test my persistent classes with JUnit. Running these tests as either a part of an ant script or within Eclipse is a very nice environment. Back in the day when I used to write all my own JDBC and SQL code it was very easy to do this. I only had to instantiate a data source, throw it ...