Skip to content

Commit 14c4c12

Browse files
committed
HBX-3080: Refactor the Gradle integration tests to factor out common code
- Pull up method 'constructHibernateToolsPluginLine()' Signed-off-by: Koen Aers <[email protected]>
1 parent 2c511d8 commit 14c4c12

File tree

6 files changed

+5
-25
lines changed

6 files changed

+5
-25
lines changed

gradle/plugin/src/functionalTest/java/org/hibernate/tool/gradle/java/JpaDefaultTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,4 @@ private String constructJdbcConnectionString() {
149149
return "jdbc:h2:" + getProjectDir().getAbsolutePath() + "/database/test;AUTO_SERVER=TRUE";
150150
}
151151

152-
private String constructHibernateToolsPluginLine() {
153-
return " id 'org.hibernate.tool.hibernate-tools-gradle' version '"
154-
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
155-
}
156-
157152
}

gradle/plugin/src/functionalTest/java/org/hibernate/tool/gradle/java/NoAnnotationsTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,4 @@ private String constructJdbcConnectionString() {
163163
return "jdbc:h2:" + getProjectDir().getAbsolutePath() + "/database/test;AUTO_SERVER=TRUE";
164164
}
165165

166-
private String constructHibernateToolsPluginLine() {
167-
return " id 'org.hibernate.tool.hibernate-tools-gradle' version '"
168-
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
169-
}
170-
171166
}

gradle/plugin/src/functionalTest/java/org/hibernate/tool/gradle/java/NoGenerics.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,4 @@ private String constructJdbcConnectionString() {
163163
return "jdbc:h2:" + getProjectDir().getAbsolutePath() + "/database/test;AUTO_SERVER=TRUE";
164164
}
165165

166-
private String constructHibernateToolsPluginLine() {
167-
return " id 'org.hibernate.tool.hibernate-tools-gradle' version '"
168-
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
169-
}
170-
171166
}

gradle/plugin/src/functionalTest/java/org/hibernate/tool/gradle/java/UseGenerics.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,4 @@ private String constructJdbcConnectionString() {
149149
return "jdbc:h2:" + getProjectDir().getAbsolutePath() + "/database/test;AUTO_SERVER=TRUE";
150150
}
151151

152-
private String constructHibernateToolsPluginLine() {
153-
return " id 'org.hibernate.tool.hibernate-tools-gradle' version '"
154-
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
155-
}
156-
157152
}

gradle/plugin/src/functionalTest/java/org/hibernate/tool/gradle/tutorial/TutorialTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,4 @@ private String constructJdbcConnectionString() {
145145
return "jdbc:h2:" + getProjectDir().getAbsolutePath() + "/database/test;AUTO_SERVER=TRUE";
146146
}
147147

148-
private String constructHibernateToolsPluginLine() {
149-
return " id 'org.hibernate.tool.hibernate-tools-gradle' version '"
150-
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
151-
}
152-
153148
}

gradle/plugin/src/functionalTest/java/org/hibernate/tool/it/gradle/TestTemplate.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ protected String constructH2DatabaseDependencyLine() {
2525
return " implementation 'com.h2database:h2:" + System.getenv("H2_VERSION") + "'";
2626
}
2727

28+
protected String constructHibernateToolsPluginLine() {
29+
return " id 'org.hibernate.tool.hibernate-tools-gradle' version '"
30+
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
31+
}
32+
2833
}

0 commit comments

Comments
 (0)