Update src/test/java/com/demo/JsonEchoTest.java

This commit is contained in:
2025-05-29 13:21:52 +03:00
parent 51f7c96b20
commit 176911c846

View File

@@ -9,12 +9,12 @@ import static org.hamcrest.CoreMatchers.is;
@QuarkusTest @QuarkusTest
class JsonEchoTest { class JsonEchoTest {
@Test @Test
void testHelloEndpoint() { void testEchoEndpoint() {
given() given()
.when().get("/hello") .queryParam("param", "testValue") // Add a parameter since /echo requires it
.when().get("/echo") // Call the correct endpoint
.then() .then()
.statusCode(200) .statusCode(200)
.body(is("Hello from Quarkus REST")); .body(is("{\"param\":\"testValue\"}")); // Expected JSON response
} }
}
}