diff --git a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/ProjectGeneratorIntegrationTests.java b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/ProjectGeneratorIntegrationTests.java index 80906a1cb9..014701c135 100644 --- a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/ProjectGeneratorIntegrationTests.java +++ b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/ProjectGeneratorIntegrationTests.java @@ -37,6 +37,8 @@ import org.junit.jupiter.api.io.TempDir; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Fail.fail; + /** * Tests for {@link ProjectGenerator} that uses all available @@ -106,6 +108,14 @@ private void runBuild(Path mavenHome, Path projectDirectory, MutableProjectDescr processBuilder.redirectOutput(output.toFile()); assertThat(processBuilder.start().waitFor()).describedAs(String.join("\n", Files.readAllLines(output))) .isEqualTo(0); + + if (description.getBuildSystem().id().equals(GradleBuildSystem.ID)) { + assertThat(output.toFile()).content().contains("BUILD SUCCESSFUL"); + } else if (description.getBuildSystem().id().equals(MavenBuildSystem.ID)) { + assertThat(output.toFile()).content().contains("BUILD SUCCESS"); + } else { + fail("unexpected Build System: " + description.getBuildSystem().id()); + } } private ProcessBuilder createProcessBuilder(Path directory, BuildSystem buildSystem, Path home) {