Update src/test/java/com/demo/JsonEchoTest.java
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user