Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
replace deprecated #mountSubRouter to Route#subRouter
delete temporary folder after each test

update dependencies
replace deprecated #mountSubRouter to Route#subRouter
delete temporary folder after each test
  • Loading branch information
Fyro-Ing committed Sep 20, 2022
1 parent c459f69 commit 193efc4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class {{title}}Verticle extends AbstractVerticle {
server = vertx.createHttpServer(new HttpServerOptions().setPort({{serverPort}}).setHost("localhost"))
.requestHandler(router);

router.mountSubRouter("/", openapiRouter);
router.route("/*").subRouter(openapiRouter);

router.route().last().handler(context ->
context.response()
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/handlebars/JavaVertXServer/pom.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<jupiter.version>5.8.2</jupiter.version>
<vertx.version>4.3.0</vertx.version>
<jupiter.version>5.9.0</jupiter.version>
<vertx.version>4.3.3</vertx.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<jackson.version>2.13.3</jackson.version>
<jackson.version>2.13.4</jackson.version>
<joschi.version>2.12.5</joschi.version>
<slf4j-version>1.7.36</slf4j-version>
<slf4j-version>2.0.1</slf4j-version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void setUp() throws Exception {

@AfterMethod
public void tearDown() {
//folder.delete();
folder.delete();
}

@Test(description = "verify that main verticle, openapi verticle and service are written as expected (OAS 2.x & web-api-service & Future)")
Expand Down Expand Up @@ -95,7 +95,7 @@ public void testUseOas2AndWebApiServiceAndFuture() throws Exception {

Assert.assertTrue(content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down Expand Up @@ -161,7 +161,7 @@ public void testUseOas2AndWebApiServiceAndNotFuture() throws Exception {

Assert.assertTrue(content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down Expand Up @@ -223,7 +223,7 @@ public void testUseOas3AndWebApiServiceAndFuture() throws Exception {
Assert.assertTrue(
content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down Expand Up @@ -284,7 +284,7 @@ public void testUseOas3AndWebApiServiceAndNotFuture() throws Exception {
Assert.assertTrue(
content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down Expand Up @@ -354,7 +354,7 @@ public void testRxUseOas3AndWebApiServiceAndFuture() throws Exception {

Assert.assertTrue(content.contains("return RouterBuilder.rxCreate(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertFalse(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertFalse(content.contains("onFailure(startPromise::fail);"));
Assert.assertTrue(content.contains("rxStart()"));
Expand Down Expand Up @@ -428,7 +428,7 @@ public void testRxUseOas3AndWebApiServiceAndNotFuture() throws Exception {

Assert.assertTrue(content.contains("return RouterBuilder.rxCreate(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertFalse(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertFalse(content.contains("onFailure(startPromise::fail);"));
Assert.assertTrue(content.contains("rxStart()"));
Expand Down Expand Up @@ -495,7 +495,7 @@ public void testUseOas3AndMountFromInterfaceAndFuture() throws Exception {
Assert.assertTrue(content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertFalse(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("routerBuilder.mountServiceInterface"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down Expand Up @@ -555,7 +555,7 @@ public void testUseOas3AndMountFromInterfaceAndNotFuture() throws Exception {
Assert.assertTrue(content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertFalse(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("routerBuilder.mountServiceInterface"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down Expand Up @@ -618,7 +618,7 @@ public void testUseOas3AndWebApiServiceAndNoDataobjectAndFuture() throws Excepti
Assert.assertTrue(
content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down Expand Up @@ -675,7 +675,7 @@ public void testUseOas3AndWebApiServiceAndNoDataobjectAndNotFuture() throws Exce
Assert.assertTrue(
content.contains("RouterBuilder.create(this.vertx, \"openapi.yaml\")"));
Assert.assertTrue(content.contains("routerBuilder.mountServicesFromExtensions();"));
Assert.assertTrue(content.contains("router.mountSubRouter(\"/\", openapiRouter);"));
Assert.assertTrue(content.contains("router.route(\"/*\").subRouter(openapiRouter);"));
Assert.assertTrue(content.contains("onSuccess(server -> startPromise.complete())"));
Assert.assertTrue(content.contains("onFailure(startPromise::fail);"));

Expand Down

0 comments on commit 193efc4

Please sign in to comment.