File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
ant/src/it/java/org/hibernate/tool/ant Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,19 @@ public void testProperties() throws Exception {
120120 }
121121 }
122122
123+ @ Test
124+ public void testTemplatePath () throws Exception {
125+ File buildFile = new File (baseFolder , "templatepath/build.xml" );
126+ Project project = createProject (buildFile );
127+ assertNotNull (project );
128+ File personFile = new File (baseFolder , "templatepath/generated/Person.java" );
129+ assertFalse (personFile .exists ());
130+ project .executeTarget ("reveng" );
131+ assertTrue (personFile .exists ());
132+ String personFileContents = new String (Files .readAllBytes (personFile .toPath ()));
133+ assertTrue (personFileContents .contains ("// This is just an example of a custom template" ));
134+ }
135+
123136 private Project createProject (File buildXmlFile ) throws Exception {
124137 Project result = new Project ();
125138 ProjectHelper projectHelper = ProjectHelper .getProjectHelper ();
You can’t perform that action at this time.
0 commit comments