Skip to content

Commit e5a9ef2

Browse files
committed
Fixed playground tests
1 parent 24c9018 commit e5a9ef2

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class GreetingResourceTest {
1212
@Test
1313
public void testHelloEndpoint() {
1414
given()
15-
.when().get("/hello")
15+
.when().get( TestConsts.BASE_API_PATH+"/hello" )
1616
.then()
1717
.statusCode(200)
1818
.body(is("Hello from RESTEasy Reactive"));
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.fugerit.java;
2+
3+
public class TestConsts {
4+
5+
public static final String BASE_API_PATH = "/playground/api";
6+
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.fugerit.java.doc.playground;
2+
3+
import io.quarkus.test.junit.QuarkusIntegrationTest;
4+
5+
@QuarkusIntegrationTest
6+
public class ValRestIT extends ValRestTest {
7+
// Execute the same tests but in packaged mode.
8+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package org.fugerit.java.doc.playground;
2+
3+
import io.quarkus.test.junit.QuarkusTest;
4+
import org.junit.jupiter.api.Test;
5+
6+
import static io.restassured.RestAssured.given;
7+
import static org.hamcrest.CoreMatchers.is;
8+
9+
import org.fugerit.java.TestConsts;
10+
11+
@QuarkusTest
12+
public class ValRestTest {
13+
14+
@Test
15+
public void testHelloEndpoint() {
16+
given()
17+
.when().get( TestConsts.BASE_API_PATH+"/val/supported_extensions" )
18+
.then()
19+
.statusCode(200)
20+
.body(is("[\"JPG\",\"TIF\",\"DOCX\",\"XLSX\",\"TIFF\",\"PDF\",\"PNG\",\"DOC\",\"JPEG\",\"XLS\"]"));
21+
}
22+
23+
}

0 commit comments

Comments
 (0)