Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ant/src/it/java/org/hibernate/tool/ant/ExamplesTestIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public class ExamplesTestIT {

@BeforeAll
public static void beforeAll() throws Exception {
// The needed resource for this test are put in place
// in the 'baseFolder' (normally 'target/test-classes')
// by the 'build-helper-maven-plugin' execution.
// See the 'pom.xml'
baseFolder = determineBaseFolder();
editIncludedXml();
overwriteHibernateProperties();
Expand Down Expand Up @@ -84,6 +88,17 @@ public void testJpa() throws Exception {
assertTrue(barSqlFile.exists());
}

@Test
public void testNative() throws Exception {
File buildFile = new File(baseFolder, "native/build.xml");
Project project = createProject(buildFile);
assertNotNull(project);
File fooSqlFile = new File(baseFolder, "native/generated/foo.sql");
assertFalse(fooSqlFile.exists());
project.executeTarget("reveng");
assertTrue(fooSqlFile.exists());
}

private Project createProject(File buildXmlFile) throws Exception {
Project result = new Project();
ProjectHelper projectHelper = ProjectHelper.getProjectHelper();
Expand Down