Skip to content

Commit

Permalink
Use standart Vert.X API for validation
Browse files Browse the repository at this point in the history
See quarkusio/quarkus#44612 for details
Previous version were removed here due to deprecation:
77ee8d5#diff-297033851be162e9f425d8b2dfdc83df0fa54100ca3714478d9a67c8690c7fbdL24

# Conflicts:
#	pom.xml
  • Loading branch information
fedinskiy committed Nov 21, 2024
1 parent 0e2b627 commit ee82153
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package io.quarkus.qe;

import static org.junit.jupiter.api.Assertions.assertEquals;

import java.net.HttpURLConnection;

import org.junit.jupiter.api.Test;

import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.scenarios.QuarkusScenario;
import io.quarkus.test.services.QuarkusApplication;
import io.vertx.core.http.HttpResponseExpectation;
import io.vertx.mutiny.ext.web.client.HttpResponse;
import org.junit.jupiter.api.Test;

import static io.smallrye.mutiny.vertx.core.Expectations.expectation;
import static org.junit.jupiter.api.Assertions.assertEquals;

@QuarkusScenario
public class ReactiveGreetingResourceIT {
Expand All @@ -20,10 +20,8 @@ public class ReactiveGreetingResourceIT {
public void shouldSayDefaultGreeting() {
String response = app.mutiny().get("/reactive-greeting")
.send()
.map(resp -> {
assertEquals(HttpURLConnection.HTTP_OK, resp.statusCode(), "Expected HTTP OK status");
return resp.bodyAsString();
})
.plug(expectation(HttpResponse::getDelegate, HttpResponseExpectation.status(200)))
.map(HttpResponse::bodyAsString)
.await().indefinitely();

assertEquals("Hello, I'm victor", response);
Expand Down
4 changes: 4 additions & 0 deletions quarkus-test-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<groupId>io.smallrye.reactive</groupId>
<artifactId>smallrye-mutiny-vertx-web-client</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>smallrye-mutiny-vertx-core</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye.certs</groupId>
<artifactId>smallrye-certificate-generator</artifactId>
Expand Down

0 comments on commit ee82153

Please sign in to comment.