-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RestEasy Reactive: don't bail out from scanning on no @path annotations
fixes #19556
- Loading branch information
1 parent
768e1cb
commit ed9f4d7
Showing
4 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/NoPathInTheAppTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package io.quarkus.rest.client.reactive; | ||
|
||
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; | ||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.net.URI; | ||
|
||
import org.eclipse.microprofile.rest.client.RestClientBuilder; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import com.github.tomakehurst.wiremock.WireMockServer; | ||
import com.github.tomakehurst.wiremock.client.WireMock; | ||
|
||
import io.quarkus.test.QuarkusUnitTest; | ||
|
||
public class NoPathInTheAppTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusUnitTest TEST = new QuarkusUnitTest() | ||
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) | ||
.addClasses(PlaylistService.class)); | ||
|
||
private WireMockServer server; | ||
|
||
@BeforeEach | ||
public void setUp() { | ||
server = new WireMockServer(8181); | ||
server.stubFor(WireMock.get("/hello") | ||
.willReturn(aResponse().withBody("hello, world!").withStatus(200))); | ||
server.start(); | ||
} | ||
|
||
@AfterEach | ||
public void shutdown() { | ||
server.shutdown(); | ||
} | ||
|
||
@Test | ||
void shouldGet() { | ||
PlaylistService client = RestClientBuilder.newBuilder().baseUri(URI.create("http://localhost:8181/hello")) | ||
.build(PlaylistService.class); | ||
assertThat(client.get()).isEqualTo("hello, world!"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...nt-reactive/deployment/src/test/java/io/quarkus/rest/client/reactive/PlaylistService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.quarkus.rest.client.reactive; | ||
|
||
import javax.ws.rs.GET; | ||
|
||
public interface PlaylistService { | ||
|
||
@GET | ||
String get(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters