File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
moqu/deployment/src/test/java/io/quarkiverse/openapi/generator Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 99
1010public class MoquProjectProcessorTest {
1111
12+ private static final String WIREMOCK_MAPPINGS_JSON_PATH = "/q/moqu/json/api/wiremock-mappings.json" ;
13+
1214 @ RegisterExtension
1315 static final QuarkusDevModeTest unitTest = new QuarkusDevModeTest ()
1416 .withApplicationRoot (javaArchive -> javaArchive
@@ -38,10 +40,27 @@ void testModeAsDownload() {
3840 @ Test
3941 void testModeAsDownloadUsingJson () {
4042 RestAssured .given ()
41- .when ().get ("/q/moqu/json/api/wiremock-mappings.json" )
43+ .when ().get (WIREMOCK_MAPPINGS_JSON_PATH )
4244 .then ()
4345 .statusCode (200 )
4446 .body (Matchers .containsString ("Alice" ))
4547 .log ().ifError ();
4648 }
49+
50+ @ Test
51+ void testDevModeWatchOpenApiFiles () {
52+ RestAssured .given ()
53+ .when ().get (WIREMOCK_MAPPINGS_JSON_PATH )
54+ .then ()
55+ .statusCode (200 )
56+ .body (Matchers .containsString ("80" ));
57+
58+ unitTest .modifyResourceFile ("openapi/api.json" , (content ) -> content .replace ("80" , "77" ));
59+
60+ RestAssured .given ()
61+ .when ().get (WIREMOCK_MAPPINGS_JSON_PATH )
62+ .then ()
63+ .statusCode (200 )
64+ .body (Matchers .containsString ("77" ));
65+ }
4766}
You can’t perform that action at this time.
0 commit comments