Skip to content

Commit e358b0b

Browse files
committed
HBX-3080: Refactor the Gradle integration tests to factor out common code
- Pull up the 'GRADLE_INIT_PROJECT_ARGUMENTS' class variable Signed-off-by: Koen Aers <[email protected]>
1 parent ff51ca2 commit e358b0b

File tree

6 files changed

+4
-15
lines changed

6 files changed

+4
-15
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
public class JpaDefaultTest extends TestTemplate {
2222

23-
private static final List<String> GRADLE_INIT_PROJECT_ARGUMENTS = List.of(
24-
"init", "--type", "java-application", "--dsl", "groovy", "--test-framework", "junit-jupiter", "--java-version", "17");
25-
2623
@Test
2724
public void testTutorial() throws Exception {
2825
assertTrue(getProjectDir().exists());

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
public class NoAnnotationsTest extends TestTemplate {
2222

23-
private static final List<String> GRADLE_INIT_PROJECT_ARGUMENTS = List.of(
24-
"init", "--type", "java-application", "--dsl", "groovy", "--test-framework", "junit-jupiter", "--java-version", "17");
25-
2623
@Test
2724
public void testTutorial() throws Exception {
2825
assertTrue(getProjectDir().exists());

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
public class NoGenerics extends TestTemplate {
2121

22-
private static final List<String> GRADLE_INIT_PROJECT_ARGUMENTS = List.of(
23-
"init", "--type", "java-application", "--dsl", "groovy", "--test-framework", "junit-jupiter", "--java-version", "17");
24-
2522
@Test
2623
public void testTutorial() throws Exception {
2724
assertTrue(getProjectDir().exists());

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
public class UseGenerics extends TestTemplate {
2121

22-
private static final List<String> GRADLE_INIT_PROJECT_ARGUMENTS = List.of(
23-
"init", "--type", "java-application", "--dsl", "groovy", "--test-framework", "junit-jupiter", "--java-version", "17");
24-
2522
@Test
2623
public void testTutorial() throws Exception {
2724
assertTrue(getProjectDir().exists());

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
public class TutorialTest extends TestTemplate {
2222

23-
private static final List<String> GRADLE_INIT_PROJECT_ARGUMENTS = List.of(
24-
"init", "--type", "java-application", "--dsl", "groovy", "--test-framework", "junit-jupiter", "--java-version", "17");
25-
2623
@Test
2724
public void testTutorial() throws Exception {
2825
assertTrue(getProjectDir().exists());

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
@@ -1,11 +1,15 @@
11
package org.hibernate.tool.it.gradle;
22

33
import java.io.File;
4+
import java.util.List;
45

56
import org.junit.jupiter.api.io.TempDir;
67

78
public class TestTemplate {
89

10+
protected static final List<String> GRADLE_INIT_PROJECT_ARGUMENTS = List.of(
11+
"init", "--type", "java-application", "--dsl", "groovy", "--test-framework", "junit-jupiter", "--java-version", "17");
12+
913
@TempDir
1014
private File projectDir;
1115

0 commit comments

Comments
 (0)