This page is served by Quarkus. The source is in src/main/resources/META-INF/resources/index.html.
See demo/add-person-created-event.sh and event demo/person-created-event.json to add an event
+ + diff --git a/quarkus/query/src/main/resources/application.properties b/quarkus/query/src/main/resources/application.properties new file mode 100644 index 0000000..8b7fdba --- /dev/null +++ b/quarkus/query/src/main/resources/application.properties @@ -0,0 +1,7 @@ +# Configuration file + +quarkus.datasource.url=jdbc:h2:mem:querydb +quarkus.datasource.driver=org.h2.Driver +quarkus.datasource.username=sa +quarkus.datasource.password= +quarkus.hibernate-orm.database.generation=drop-and-create diff --git a/quarkus/query/src/test/java/org/fuin/cqrs4j/example/quarkus/query/NativePersonResourceIT.java b/quarkus/query/src/test/java/org/fuin/cqrs4j/example/quarkus/query/NativePersonResourceIT.java new file mode 100644 index 0000000..4be9c2f --- /dev/null +++ b/quarkus/query/src/test/java/org/fuin/cqrs4j/example/quarkus/query/NativePersonResourceIT.java @@ -0,0 +1,9 @@ +package org.fuin.cqrs4j.example.quarkus.query; + +import io.quarkus.test.junit.NativeImageTest; + +@NativeImageTest +public class NativePersonResourceIT extends PersonResourceTest { + + // Execute the same tests but in native mode. +} \ No newline at end of file diff --git a/quarkus/query/src/test/java/org/fuin/cqrs4j/example/quarkus/query/PersonResourceTest.java b/quarkus/query/src/test/java/org/fuin/cqrs4j/example/quarkus/query/PersonResourceTest.java new file mode 100644 index 0000000..1abbf5a --- /dev/null +++ b/quarkus/query/src/test/java/org/fuin/cqrs4j/example/quarkus/query/PersonResourceTest.java @@ -0,0 +1,20 @@ +package org.fuin.cqrs4j.example.quarkus.query; + +import io.quarkus.test.junit.QuarkusTest; +import org.junit.jupiter.api.Test; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.is; + +@QuarkusTest +public class PersonResourceTest { + + @Test + public void testGetAll() { + given() + .when().get("/persons") + .then() + .statusCode(200); + } + +} \ No newline at end of file diff --git a/quarkus/shared/pom.xml b/quarkus/shared/pom.xml index 7b15152..6140c4b 100644 --- a/quarkus/shared/pom.xml +++ b/quarkus/shared/pom.xml @@ -48,7 +48,7 @@