Skip to content

Commit 2c511d8

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

File tree

6 files changed

+4
-20
lines changed

6 files changed

+4
-20
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,4 @@ private String constructHibernateToolsPluginLine() {
154154
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
155155
}
156156

157-
private String constructH2DatabaseDependencyLine() {
158-
return " implementation 'com.h2database:h2:" + System.getenv("H2_VERSION") + "'";
159-
}
160-
161157
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,4 @@ private String constructHibernateToolsPluginLine() {
168168
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
169169
}
170170

171-
private String constructH2DatabaseDependencyLine() {
172-
return " implementation 'com.h2database:h2:" + System.getenv("H2_VERSION") + "'";
173-
}
174-
175171
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,4 @@ private String constructHibernateToolsPluginLine() {
168168
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
169169
}
170170

171-
private String constructH2DatabaseDependencyLine() {
172-
return " implementation 'com.h2database:h2:" + System.getenv("H2_VERSION") + "'";
173-
}
174-
175171
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,4 @@ private String constructHibernateToolsPluginLine() {
154154
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
155155
}
156156

157-
private String constructH2DatabaseDependencyLine() {
158-
return " implementation 'com.h2database:h2:" + System.getenv("H2_VERSION") + "'";
159-
}
160-
161157
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,4 @@ private String constructHibernateToolsPluginLine() {
150150
+ System.getenv("HIBERNATE_TOOLS_VERSION") + "'";
151151
}
152152

153-
private String constructH2DatabaseDependencyLine() {
154-
return " implementation 'com.h2database:h2:" + System.getenv("H2_VERSION") + "'";
155-
}
156-
157153
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ public class TestTemplate {
2121
protected File getDatabaseFile() { return databaseFile; }
2222
protected void setDatabaseFile(File f) { databaseFile = f; }
2323

24+
protected String constructH2DatabaseDependencyLine() {
25+
return " implementation 'com.h2database:h2:" + System.getenv("H2_VERSION") + "'";
26+
}
27+
2428
}

0 commit comments

Comments
 (0)