svkcemk commented on code in PR #3972: URL: https://github.com/apache/camel-quarkus/pull/3972#discussion_r942322025
########## integration-tests/validator/src/test/java/org/apache/camel/quarkus/component/validator/it/ValidatorTest.java: ########## @@ -16,84 +16,40 @@ */ package org.apache.camel.quarkus.component.validator.it; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; import io.restassured.http.ContentType; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; @QuarkusTest +@QuarkusTestResource(ValidatorTestResource.class) class ValidatorTest { - @Test - public void validXMLFromClassPath() { + @ParameterizedTest + @ValueSource(strings = { "classpath", "filesystem", "http" }) + public void validXML(String scheme) { RestAssured.given() .contentType(ContentType.XML) .body("<message><firstName>MyFirstname</firstName><lastName>MyLastname</lastName></message>") - .post("/validator/classpath") + .post("/validator/validate/" + scheme) .then() .statusCode(200); } - @Test - public void invalidXMLFromClassPath() { + @ParameterizedTest + @ValueSource(strings = { "classpath", "filesystem", "http" }) + public void inValidXML(String scheme) { RestAssured.given() .contentType(ContentType.XML) .body("<message><firstName>MyFirstname</firstName></message>") - .post("/validator/classpath") + .post("/validator/validate/" + scheme) .then() .statusCode(500); Review Comment: @ppalaga I have added some checks based on the body, I think it will make more sense now, Thanks for pointing out ! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org