diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java index be073b6c7..be412c7db 100644 --- a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java @@ -12,7 +12,7 @@ public class GreetingResourceTest { @Test public void testHelloEndpoint() { given() - .when().get("/hello") + .when().get( TestConsts.BASE_API_PATH+"/hello" ) .then() .statusCode(200) .body(is("Hello from RESTEasy Reactive")); diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/TestConsts.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/TestConsts.java new file mode 100644 index 000000000..497f67403 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/TestConsts.java @@ -0,0 +1,7 @@ +package org.fugerit.java; + +public class TestConsts { + + public static final String BASE_API_PATH = "/playground/api"; + +} diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestIT.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestIT.java new file mode 100644 index 000000000..0e9959f30 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestIT.java @@ -0,0 +1,8 @@ +package org.fugerit.java.doc.playground; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class ValRestIT extends ValRestTest { + // Execute the same tests but in packaged mode. +} diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestTest.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestTest.java new file mode 100644 index 000000000..097b5c3c6 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestTest.java @@ -0,0 +1,23 @@ +package org.fugerit.java.doc.playground; + +import io.quarkus.test.junit.QuarkusTest; +import org.junit.jupiter.api.Test; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.is; + +import org.fugerit.java.TestConsts; + +@QuarkusTest +public class ValRestTest { + + @Test + public void testHelloEndpoint() { + given() + .when().get( TestConsts.BASE_API_PATH+"/val/supported_extensions" ) + .then() + .statusCode(200) + .body(is("[\"JPG\",\"TIF\",\"DOCX\",\"XLSX\",\"TIFF\",\"PDF\",\"PNG\",\"DOC\",\"JPEG\",\"XLS\"]")); + } + +} \ No newline at end of file