Hyperjaxb3 roundtrip tests
Roundtrip tests are used within the integration testing in order to check if the generated O/R mapping (be it HBM files or annotations) are allright.
Typical roundtrip test senario is as follows:
I've already implemented a roundtrip test case for HBM file-based Hibernate mappings (see
I'll need such a roundtrip test for each for the target ORM platforms.
Typical roundtrip test senario is as follows:
- Unmarshall the file/resource.
- Save the unmarshalled object into the database, memorize the id.
- Load the object from the database by the memorized id.
- Compare unmarshalled and loaded objects, check identity.
I've already implemented a roundtrip test case for HBM file-based Hibernate mappings (see
org.jvnet.hyperjaxb3.hibernate.roundtrip.RoundtripTestCase
). You only have to subclass this class in the target package and specify which sample files should be used for testing (see org.jvnet.hyperjaxb3.hibernate.roundtrip.tests.RoundtripTestCaseTest). The tests runs versus the in-memory HSQLDB database, database schema is automatically generated, very easy to use.I'll need such a roundtrip test for each for the target ORM platforms.
1 Comments:
Hibernate versioning, unfortunately, seems to screw this up.
Post a Comment
<< Home