Update src/test/java/com/demo/JsonEchoTest.java
This commit is contained in:
@@ -9,12 +9,12 @@ import static org.hamcrest.CoreMatchers.is;
|
||||
@QuarkusTest
|
||||
class JsonEchoTest {
|
||||
@Test
|
||||
void testHelloEndpoint() {
|
||||
void testEchoEndpoint() {
|
||||
given()
|
||||
.when().get("/hello")
|
||||
.queryParam("param", "testValue") // Add a parameter since /echo requires it
|
||||
.when().get("/echo") // Call the correct endpoint
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(is("Hello from Quarkus REST"));
|
||||
.body(is("{\"param\":\"testValue\"}")); // Expected JSON response
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user