Skip to content

Commit

Permalink
Fixed playground tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Dec 29, 2022
1 parent 24c9018 commit e5a9ef2
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.fugerit.java;

public class TestConsts {

public static final String BASE_API_PATH = "/playground/api";

}
Original file line number Diff line number Diff line change
@@ -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.
}
Original file line number Diff line number Diff line change
@@ -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\"]"));
}

}

0 comments on commit e5a9ef2

Please sign in to comment.