Skip to content

Commit 0bdc7f9

Browse files
committed
HBX-3110: Add a functional test to guard the sanity of the Ant examples
- Add a test verifying the 'jpa' example Signed-off-by: Koen Aers <[email protected]>
1 parent 64240f3 commit 0bdc7f9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ant/src/it/java/org/hibernate/tool/ant/ExamplesTestIT.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ public void testConfiguration() throws Exception {
7373
assertTrue(cfgXmlFile.exists());
7474
}
7575

76+
@Test
77+
public void testJpa() throws Exception {
78+
File buildFile = new File(baseFolder, "jpa/build.xml");
79+
Project project = createProject(buildFile);
80+
assertNotNull(project);
81+
File barSqlFile = new File(baseFolder, "jpa/generated/bar.sql");
82+
assertFalse(barSqlFile.exists());
83+
project.executeTarget("reveng");
84+
assertTrue(barSqlFile.exists());
85+
}
86+
7687
private Project createProject(File buildXmlFile) throws Exception {
7788
Project result = new Project();
7889
ProjectHelper projectHelper = ProjectHelper.getProjectHelper();

0 commit comments

Comments
 (0)