diff options
Diffstat (limited to 'src/functionalTest/java/ch/fhnw/thga/gradleplugins/SetupFregeTaskFunctionalTest.java')
-rw-r--r-- | src/functionalTest/java/ch/fhnw/thga/gradleplugins/SetupFregeTaskFunctionalTest.java | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/functionalTest/java/ch/fhnw/thga/gradleplugins/SetupFregeTaskFunctionalTest.java b/src/functionalTest/java/ch/fhnw/thga/gradleplugins/SetupFregeTaskFunctionalTest.java index 6781764..b0ced6d 100644 --- a/src/functionalTest/java/ch/fhnw/thga/gradleplugins/SetupFregeTaskFunctionalTest.java +++ b/src/functionalTest/java/ch/fhnw/thga/gradleplugins/SetupFregeTaskFunctionalTest.java @@ -2,6 +2,7 @@ package ch.fhnw.thga.gradleplugins; import static ch.fhnw.thga.gradleplugins.FregeExtension.DEFAULT_RELATIVE_COMPILER_DOWNLOAD_DIR; import static ch.fhnw.thga.gradleplugins.FregePlugin.SETUP_FREGE_TASK_NAME; +import static ch.fhnw.thga.gradleplugins.SharedFunctionalTestLogic.assertFileExists; import static ch.fhnw.thga.gradleplugins.SharedFunctionalTestLogic.createFregeSection; import static ch.fhnw.thga.gradleplugins.SharedFunctionalTestLogic.runGradleTask; import static org.gradle.testkit.runner.TaskOutcome.SUCCESS; @@ -16,8 +17,8 @@ import org.gradle.testkit.runner.BuildResult; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.IndicativeSentencesGeneration; import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import ch.fhnw.thga.gradleplugins.fregeproject.FregeProjectBuilder; @@ -26,20 +27,22 @@ import ch.fhnw.thga.gradleplugins.fregeproject.ProjectRoot; @Tag("network") class SetupFregeTaskFunctionalTest { - private static FregeDTOBuilder FREGE_BUILDER = FregeDTOBuilder.builder(); + private static FregeDTOBuilder FREGE_BUILDER = FregeDTOBuilder.builder(); private static ProjectRoot FREGE_PROJECT_BUILDER = FregeProjectBuilder.builder(); @Nested - @IndicativeSentencesGeneration(separator = " -> ", generator = DisplayNameGenerator.ReplaceUnderscores.class) + @IndicativeSentencesGeneration( + separator = " -> ", + generator = DisplayNameGenerator.ReplaceUnderscores.class) class Setup_frege_task_works { @Test void given_minimal_build_file_config(@TempDir File testProjectDir) throws Exception { String minimalBuildFileConfig = createFregeSection( FREGE_BUILDER - .version("'3.25.84'") - .release("'3.25alpha'") - .build() + .version("'3.25.84'") + .release("'3.25alpha'") + .build() ); Project project = FREGE_PROJECT_BUILDER @@ -56,12 +59,9 @@ class SetupFregeTaskFunctionalTest .getByName(SETUP_FREGE_TASK_NAME) instanceof SetupFregeTask ); assertEquals(SUCCESS, result.task(":" + SETUP_FREGE_TASK_NAME).getOutcome()); - assertTrue( - testProjectDir - .toPath() - .resolve(Paths.get(DEFAULT_RELATIVE_COMPILER_DOWNLOAD_DIR, "frege3.25.84.jar")) - .toFile() - .exists() + assertFileExists( + testProjectDir, + Paths.get(DEFAULT_RELATIVE_COMPILER_DOWNLOAD_DIR, "frege3.25.84.jar").toString() ); } @@ -92,12 +92,9 @@ class SetupFregeTaskFunctionalTest .getByName(SETUP_FREGE_TASK_NAME) instanceof SetupFregeTask ); assertEquals(SUCCESS, result.task(":" + SETUP_FREGE_TASK_NAME).getOutcome()); - assertTrue( - testProjectDir - .toPath() - .resolve(Paths.get("dist", "frege3.25.84.jar")) - .toFile() - .exists() + assertFileExists( + testProjectDir, + Paths.get("dist", "frege3.25.84.jar").toString() ); } } |