From f4b376bbbee11596f44aeb4b7d15c218e75186f0 Mon Sep 17 00:00:00 2001 From: Guillaume Le Floch Date: Sun, 17 Oct 2021 20:34:48 +0200 Subject: [PATCH] Add gradle integration test leveraging annotation processor --- .../application/build.gradle | 8 +++ .../acme/quarkus/sample/HelloResource.java | 27 ++++++++++ .../quarkus/sample/HelloResourceTest.java | 20 +++++++ .../build.gradle | 52 +++++++++++++++++++ .../common/build.gradle | 9 ++++ .../main/java/org/acme/common/CarMapper.java | 15 ++++++ .../main/java/org/acme/common/domain/Car.java | 30 +++++++++++ .../java/org/acme/common/domain/CarDTO.java | 30 +++++++++++ .../src/main/resources/META-INF/beans.xml | 0 .../gradle.properties | 4 ++ .../settings.gradle | 23 ++++++++ .../build.gradle | 40 ++++++++++++++ .../gradle.properties | 4 ++ .../settings.gradle | 23 ++++++++ .../main/java/org/acme/quarkus/CarMapper.java | 15 ++++++ .../java/org/acme/quarkus/domain/Car.java | 30 +++++++++++ .../java/org/acme/quarkus/domain/CarDTO.java | 30 +++++++++++ .../acme/quarkus/sample/HelloResource.java | 27 ++++++++++ .../quarkus/sample/HelloResourceTest.java | 20 +++++++ .../AnnotationProcessorMultiModuleTest.java | 19 +++++++ .../AnnotationProcessorSimpleModuleTest.java | 19 +++++++ ...tationProcessorMultiModuleDevModeTest.java | 15 ++++++ ...ationProcessorSimpleModuleDevModeTest.java | 15 ++++++ 23 files changed, 475 insertions(+) create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/build.gradle create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/main/java/org/acme/quarkus/sample/HelloResource.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/build.gradle create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/build.gradle create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/CarMapper.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/Car.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/CarDTO.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/resources/META-INF/beans.xml create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/gradle.properties create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-multi-module/settings.gradle create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/build.gradle create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/gradle.properties create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/settings.gradle create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/CarMapper.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/Car.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/CarDTO.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/sample/HelloResource.java create mode 100644 integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java create mode 100644 integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorMultiModuleTest.java create mode 100644 integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorSimpleModuleTest.java create mode 100644 integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorMultiModuleDevModeTest.java create mode 100644 integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorSimpleModuleDevModeTest.java diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/build.gradle b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/build.gradle new file mode 100644 index 00000000000000..4d00c4d0a779f4 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/build.gradle @@ -0,0 +1,8 @@ +plugins { + id 'io.quarkus' +} + +dependencies { + implementation project(":common") + implementation 'io.quarkus:quarkus-resteasy-jackson' +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/main/java/org/acme/quarkus/sample/HelloResource.java b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/main/java/org/acme/quarkus/sample/HelloResource.java new file mode 100644 index 00000000000000..0b3bf8d8c5a209 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/main/java/org/acme/quarkus/sample/HelloResource.java @@ -0,0 +1,27 @@ +package org.acme.quarkus.sample; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.acme.common.CarMapper; +import org.acme.common.domain.Car; +import org.acme.common.domain.CarDTO; + +@Path("/hello") +public class HelloResource { + + private final CarMapper carMapper; + + public HelloResource(CarMapper carMapper) { + this.carMapper = carMapper; + } + + @GET + @Produces(MediaType.APPLICATION_JSON) + public CarDTO hello() { + Car car = new Car("foo", 4); + return carMapper.carToCarDTO(car); + } +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java new file mode 100644 index 00000000000000..f462abb3d1e8ac --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/application/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java @@ -0,0 +1,20 @@ +package org.acme.quarkus.sample; + +import io.quarkus.test.junit.QuarkusTest; +import org.junit.jupiter.api.Test; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.containsString; + +@QuarkusTest +public class HelloResourceTest { + + @Test + public void testHelloEndpoint() { + given() + .when().get("/hello") + .then() + .statusCode(200) + .body(containsString("seatNumber")); + } +} diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/build.gradle b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/build.gradle new file mode 100644 index 00000000000000..cb42fb26582ce3 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/build.gradle @@ -0,0 +1,52 @@ +buildscript { + repositories { + if (System.properties.containsKey('maven.repo.local')) { + maven { + url System.properties.get('maven.repo.local') + } + } else { + mavenLocal() + } + mavenCentral() + gradlePluginPortal() + } +} + +apply plugin: 'java' + +group = 'com.quarkus.demo' +version = '1.0' + + +subprojects { + + apply plugin: 'java' + + test { + dependsOn 'cleanTest' + useJUnitPlatform() + forkEvery 1 + } + + repositories { + if (System.properties.containsKey('maven.repo.local')) { + maven { + url System.properties.get('maven.repo.local') + } + } else { + mavenLocal() + } + mavenCentral() + } + + dependencies { + + implementation 'io.quarkus:quarkus-resteasy' + + testImplementation 'io.quarkus:quarkus-junit5' + testImplementation 'io.rest-assured:rest-assured' + + implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") + + } +} diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/build.gradle b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/build.gradle new file mode 100644 index 00000000000000..ebda285d315a42 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/build.gradle @@ -0,0 +1,9 @@ +plugins { + id 'java-library' +} + +dependencies { + implementation "org.mapstruct:mapstruct:${mapstructVersion}" + + annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final' +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/CarMapper.java b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/CarMapper.java new file mode 100644 index 00000000000000..709387b4df8a79 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/CarMapper.java @@ -0,0 +1,15 @@ +package org.acme.common; + +import org.acme.common.domain.Car; +import org.acme.common.domain.CarDTO; +import org.mapstruct.InjectionStrategy; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(componentModel = "cdi", injectionStrategy = InjectionStrategy.CONSTRUCTOR) +public interface CarMapper { + + @Mapping(source = "numberOfSeats", target = "seatNumber") + CarDTO carToCarDTO(Car car); + +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/Car.java b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/Car.java new file mode 100644 index 00000000000000..440a7c504d8b6a --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/Car.java @@ -0,0 +1,30 @@ +package org.acme.common.domain; + +public class Car { + private String type; + private Integer numberOfSeats; + + public Car() { + } + + public Car(String type, Integer numberOfSeats) { + this.type = type; + this.numberOfSeats = numberOfSeats; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getNumberOfSeats() { + return numberOfSeats; + } + + public void setNumberOfSeats(Integer numberOfSeats) { + this.numberOfSeats = numberOfSeats; + } +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/CarDTO.java b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/CarDTO.java new file mode 100644 index 00000000000000..c12dbd303a91d7 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/java/org/acme/common/domain/CarDTO.java @@ -0,0 +1,30 @@ +package org.acme.common.domain; + +public class CarDTO { + private String type; + private Integer seatNumber; + + public CarDTO() { + } + + public CarDTO(String type, Integer seatNumber) { + this.type = type; + this.seatNumber = seatNumber; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getSeatNumber() { + return seatNumber; + } + + public void setSeatNumber(Integer seatNumber) { + this.seatNumber = seatNumber; + } +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/resources/META-INF/beans.xml b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/common/src/main/resources/META-INF/beans.xml new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/gradle.properties b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/gradle.properties new file mode 100644 index 00000000000000..f4e9b34200cdd6 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/gradle.properties @@ -0,0 +1,4 @@ +quarkusPlatformArtifactId=quarkus-bom +quarkusPlatformGroupId=io.quarkus + +mapstructVersion=1.4.2.Final \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/settings.gradle b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/settings.gradle new file mode 100644 index 00000000000000..d6e7ed6e24b3d1 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-multi-module/settings.gradle @@ -0,0 +1,23 @@ +pluginManagement { + repositories { + if (System.properties.containsKey('maven.repo.local')) { + maven { + url System.properties.get('maven.repo.local') + } + } else { + mavenLocal() + } + mavenCentral() + gradlePluginPortal() + } + //noinspection GroovyAssignabilityCheck + plugins { + id 'io.quarkus' version "${quarkusPluginVersion}" + } +} + +rootProject.name = 'quarkus-annotation-processor-multi-module-build' + +include ':common' +include ':application' + diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/build.gradle b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/build.gradle new file mode 100644 index 00000000000000..de8c23e52f99b2 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/build.gradle @@ -0,0 +1,40 @@ +plugins { + id 'java' + id 'io.quarkus' +} + +group = 'com.quarkus.demo' +version = '1.0' + +test { + dependsOn 'cleanTest' + useJUnitPlatform() + forkEvery 1 +} + +repositories { + if (System.properties.containsKey('maven.repo.local')) { + maven { + url System.properties.get('maven.repo.local') + } + } else { + mavenLocal() + } + mavenCentral() +} + +dependencies { + + implementation 'io.quarkus:quarkus-resteasy' + implementation 'io.quarkus:quarkus-resteasy-jackson' + implementation 'org.mapstruct:mapstruct:1.4.2.Final' + + annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}" + + testImplementation 'io.quarkus:quarkus-junit5' + testImplementation 'io.rest-assured:rest-assured' + + implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") + +} + diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/gradle.properties b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/gradle.properties new file mode 100644 index 00000000000000..f4e9b34200cdd6 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/gradle.properties @@ -0,0 +1,4 @@ +quarkusPlatformArtifactId=quarkus-bom +quarkusPlatformGroupId=io.quarkus + +mapstructVersion=1.4.2.Final \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/settings.gradle b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/settings.gradle new file mode 100644 index 00000000000000..d6e7ed6e24b3d1 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/settings.gradle @@ -0,0 +1,23 @@ +pluginManagement { + repositories { + if (System.properties.containsKey('maven.repo.local')) { + maven { + url System.properties.get('maven.repo.local') + } + } else { + mavenLocal() + } + mavenCentral() + gradlePluginPortal() + } + //noinspection GroovyAssignabilityCheck + plugins { + id 'io.quarkus' version "${quarkusPluginVersion}" + } +} + +rootProject.name = 'quarkus-annotation-processor-multi-module-build' + +include ':common' +include ':application' + diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/CarMapper.java b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/CarMapper.java new file mode 100644 index 00000000000000..1f24e89035019f --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/CarMapper.java @@ -0,0 +1,15 @@ +package org.acme.quarkus; + +import org.acme.quarkus.domain.Car; +import org.acme.quarkus.domain.CarDTO; +import org.mapstruct.InjectionStrategy; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(componentModel = "cdi", injectionStrategy = InjectionStrategy.CONSTRUCTOR) +public interface CarMapper { + + @Mapping(source = "numberOfSeats", target = "seatNumber") + CarDTO carToCarDTO(Car car); + +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/Car.java b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/Car.java new file mode 100644 index 00000000000000..195a69653227f0 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/Car.java @@ -0,0 +1,30 @@ +package org.acme.quarkus.domain; + +public class Car { + private String type; + private Integer numberOfSeats; + + public Car() { + } + + public Car(String type, Integer numberOfSeats) { + this.type = type; + this.numberOfSeats = numberOfSeats; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getNumberOfSeats() { + return numberOfSeats; + } + + public void setNumberOfSeats(Integer numberOfSeats) { + this.numberOfSeats = numberOfSeats; + } +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/CarDTO.java b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/CarDTO.java new file mode 100644 index 00000000000000..8b8ed356b1d325 --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/domain/CarDTO.java @@ -0,0 +1,30 @@ +package org.acme.quarkus.domain; + +public class CarDTO { + private String type; + private Integer seatNumber; + + public CarDTO() { + } + + public CarDTO(String type, Integer seatNumber) { + this.type = type; + this.seatNumber = seatNumber; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getSeatNumber() { + return seatNumber; + } + + public void setSeatNumber(Integer seatNumber) { + this.seatNumber = seatNumber; + } +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/sample/HelloResource.java b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/sample/HelloResource.java new file mode 100644 index 00000000000000..bd74f8b8bdbdce --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/main/java/org/acme/quarkus/sample/HelloResource.java @@ -0,0 +1,27 @@ +package org.acme.quarkus.sample; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.acme.quarkus.CarMapper; +import org.acme.quarkus.domain.Car; +import org.acme.quarkus.domain.CarDTO; + +@Path("/hello") +public class HelloResource { + + private final CarMapper carMapper; + + public HelloResource(CarMapper carMapper) { + this.carMapper = carMapper; + } + + @GET + @Produces(MediaType.APPLICATION_JSON) + public CarDTO hello() { + Car car = new Car("foo", 4); + return carMapper.carToCarDTO(car); + } +} \ No newline at end of file diff --git a/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java new file mode 100644 index 00000000000000..f462abb3d1e8ac --- /dev/null +++ b/integration-tests/gradle/src/main/resources/annotation-processor-simple-module/src/test/java/org/acme/quarkus/sample/HelloResourceTest.java @@ -0,0 +1,20 @@ +package org.acme.quarkus.sample; + +import io.quarkus.test.junit.QuarkusTest; +import org.junit.jupiter.api.Test; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.containsString; + +@QuarkusTest +public class HelloResourceTest { + + @Test + public void testHelloEndpoint() { + given() + .when().get("/hello") + .then() + .statusCode(200) + .body(containsString("seatNumber")); + } +} diff --git a/integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorMultiModuleTest.java b/integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorMultiModuleTest.java new file mode 100644 index 00000000000000..3a43713c46cb56 --- /dev/null +++ b/integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorMultiModuleTest.java @@ -0,0 +1,19 @@ +package io.quarkus.gradle; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +import java.io.File; + +import org.junit.jupiter.api.Test; + +public class AnnotationProcessorMultiModuleTest extends QuarkusGradleWrapperTestBase { + + @Test + public void shouldRunTestCorrectly() throws Exception { + final File projectDir = getProjectDir("annotation-processor-multi-module"); + + BuildResult buildResult = runGradleWrapper(projectDir, "clean", "test"); + + assertThat(buildResult.getTasks().get(":application:test")).isEqualTo(BuildResult.SUCCESS_OUTCOME); + } +} diff --git a/integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorSimpleModuleTest.java b/integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorSimpleModuleTest.java new file mode 100644 index 00000000000000..7e109aa25ab0b7 --- /dev/null +++ b/integration-tests/gradle/src/test/java/io/quarkus/gradle/AnnotationProcessorSimpleModuleTest.java @@ -0,0 +1,19 @@ +package io.quarkus.gradle; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +import java.io.File; + +import org.junit.jupiter.api.Test; + +public class AnnotationProcessorSimpleModuleTest extends QuarkusGradleWrapperTestBase { + + @Test + public void shouldRunTestCorrectly() throws Exception { + final File projectDir = getProjectDir("annotation-processor-simple-module"); + + BuildResult buildResult = runGradleWrapper(projectDir, "clean", "test"); + + assertThat(buildResult.getTasks().get(":test")).isEqualTo(BuildResult.SUCCESS_OUTCOME); + } +} diff --git a/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorMultiModuleDevModeTest.java b/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorMultiModuleDevModeTest.java new file mode 100644 index 00000000000000..db009746e38bec --- /dev/null +++ b/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorMultiModuleDevModeTest.java @@ -0,0 +1,15 @@ +package io.quarkus.gradle.devmode; + +import static org.assertj.core.api.Assertions.assertThat; + +public class AnnotationProcessorMultiModuleDevModeTest extends QuarkusDevGradleTestBase { + @Override + protected String projectDirectoryName() { + return "annotation-processor-multi-module"; + } + + @Override + protected void testDevMode() throws Exception { + assertThat(getHttpResponse("/hello")).contains("seatNumber"); + } +} diff --git a/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorSimpleModuleDevModeTest.java b/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorSimpleModuleDevModeTest.java new file mode 100644 index 00000000000000..cf498bd9387d5d --- /dev/null +++ b/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/AnnotationProcessorSimpleModuleDevModeTest.java @@ -0,0 +1,15 @@ +package io.quarkus.gradle.devmode; + +import static org.assertj.core.api.Assertions.assertThat; + +public class AnnotationProcessorSimpleModuleDevModeTest extends QuarkusDevGradleTestBase { + @Override + protected String projectDirectoryName() { + return "annotation-processor-simple-module"; + } + + @Override + protected void testDevMode() throws Exception { + assertThat(getHttpResponse("/hello")).contains("seatNumber"); + } +}