From 4c4c626f4a86a1f370b8cab66d72ce59ecb6e4b2 Mon Sep 17 00:00:00 2001 From: Thorsten Hirsch Date: Thu, 9 May 2024 01:00:12 +0200 Subject: [PATCH 1/9] upgrade microprofile to junit5 --- .../libraries/microprofile/api_test.mustache | 16 ++++++++++------ .../microprofile/kumuluzee.pom.mustache | 6 +++--- .../Java/libraries/microprofile/pom.mustache | 10 +++++----- .../Java/libraries/microprofile/pom_3.0.mustache | 10 +++++----- .../pom.xml | 10 +++++----- .../org/openapitools/client/api/PetApiTest.java | 6 +++--- .../openapitools/client/api/StoreApiTest.java | 6 +++--- .../org/openapitools/client/api/UserApiTest.java | 6 +++--- .../openapitools/client/model/CategoryTest.java | 6 +++--- .../client/model/ModelApiResponseTest.java | 6 +++--- .../org/openapitools/client/model/OrderTest.java | 6 +++--- .../org/openapitools/client/model/PetTest.java | 6 +++--- .../org/openapitools/client/model/TagTest.java | 6 +++--- .../org/openapitools/client/model/UserTest.java | 6 +++--- .../microprofile-rest-client-3.0-jackson/pom.xml | 10 +++++----- .../org/openapitools/client/api/PetApiTest.java | 6 +++--- .../openapitools/client/api/StoreApiTest.java | 6 +++--- .../org/openapitools/client/api/UserApiTest.java | 6 +++--- .../openapitools/client/model/CategoryTest.java | 6 +++--- .../client/model/ModelApiResponseTest.java | 6 +++--- .../org/openapitools/client/model/OrderTest.java | 6 +++--- .../org/openapitools/client/model/PetTest.java | 6 +++--- .../org/openapitools/client/model/TagTest.java | 6 +++--- .../org/openapitools/client/model/UserTest.java | 6 +++--- .../java/microprofile-rest-client-3.0/pom.xml | 10 +++++----- .../org/openapitools/client/api/PetApiTest.java | 6 +++--- .../openapitools/client/api/StoreApiTest.java | 6 +++--- .../org/openapitools/client/api/UserApiTest.java | 6 +++--- .../openapitools/client/model/CategoryTest.java | 6 +++--- .../client/model/ModelApiResponseTest.java | 6 +++--- .../org/openapitools/client/model/OrderTest.java | 6 +++--- .../org/openapitools/client/model/PetTest.java | 6 +++--- .../org/openapitools/client/model/TagTest.java | 6 +++--- .../org/openapitools/client/model/UserTest.java | 6 +++--- .../pom.xml | 10 +++++----- .../org/openapitools/client/api/PetApiTest.java | 6 +++--- .../openapitools/client/api/StoreApiTest.java | 6 +++--- .../org/openapitools/client/api/UserApiTest.java | 6 +++--- .../openapitools/client/model/CategoryTest.java | 6 +++--- .../client/model/ModelApiResponseTest.java | 6 +++--- .../org/openapitools/client/model/OrderTest.java | 6 +++--- .../org/openapitools/client/model/PetTest.java | 6 +++--- .../org/openapitools/client/model/TagTest.java | 6 +++--- .../org/openapitools/client/model/UserTest.java | 6 +++--- .../java/microprofile-rest-client/pom.xml | 10 +++++----- .../org/openapitools/client/api/PetApiTest.java | 6 +++--- .../openapitools/client/api/StoreApiTest.java | 6 +++--- .../org/openapitools/client/api/UserApiTest.java | 6 +++--- .../openapitools/client/model/CategoryTest.java | 6 +++--- .../client/model/ModelApiResponseTest.java | 6 +++--- .../org/openapitools/client/model/OrderTest.java | 6 +++--- .../org/openapitools/client/model/PetTest.java | 6 +++--- .../org/openapitools/client/model/TagTest.java | 6 +++--- .../org/openapitools/client/model/UserTest.java | 6 +++--- 54 files changed, 183 insertions(+), 179 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache index a6567c3eba01..d9af87719b47 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache @@ -4,9 +4,13 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; +{{#generateSpringBootApplication}} +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; +{{/generateSpringBootApplication}} import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -26,7 +30,7 @@ import java.util.Set; * API tests for {{classname}} */ {{#generateSpringBootApplication}} -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @SpringApplicationConfiguration(classes = SpringBootApplication.class) @WebAppConfiguration @IntegrationTest("server.port=0") @@ -36,7 +40,7 @@ public class {{classname}}Test { private {{classname}} client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { {{#microprofile3}} // TODO initialize the client @@ -69,7 +73,7 @@ public class {{classname}}Test { {{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}} {{/allParams}} //{{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}} response = {{/vendorExtensions.x-java-is-response-void}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - //{{#returnType}}assertNotNull(response);{{/returnType}} + //{{#returnType}}Assertions.assertNotNull(response);{{/returnType}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/kumuluzee.pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/kumuluzee.pom.mustache index ac235b7edf59..195aa9d44545 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/kumuluzee.pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/kumuluzee.pom.mustache @@ -18,7 +18,7 @@ 1.2.3 1.4.1 3.2.6 - 4.13 + 5.10.2 2.28 @@ -70,8 +70,8 @@ ${cxf-rt-rs-extension-providers.version} - junit - junit + org.junit.jupiter + junit-jupiter-api ${junit-version} test diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache index c91673c896c2..069094c53ff3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache @@ -58,10 +58,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test {{#useBeanValidation}} @@ -212,7 +212,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 {{#useBeanValidation}} 3.0.2 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache index 038b0e28a239..ae5a6d1fe5c5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache @@ -58,10 +58,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test {{#useBeanValidation}} @@ -205,7 +205,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 {{#useBeanValidation}} 3.0.1 diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml index 6e4d713cd549..59a919474d48 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml @@ -56,10 +56,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test @@ -154,7 +154,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 3.2.7 2.15.2 diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java index 5ba1fd677b1b..84b561f5d1a1 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,9 +16,9 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java index d2267491d2db..2c450738d661 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java index a391586b2e05..e845192af322 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,9 +15,9 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java index c4cfabbaa9a3..a1ac6bca41b5 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Category diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index d304c8ea4f4d..fe096a71a493 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelApiResponse diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java index 2f6b45ae473d..1d7b6c9efb60 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Date; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Order diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java index 89b100680bdd..f6c5afae0f28 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java @@ -22,9 +22,9 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Pet diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java index 24201a29941c..ea7eef0ef318 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Tag diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java index 53f04f7a68ba..be66f08f2536 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for User diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml index 5bbd1cc4126c..fc9f8f3c5c97 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml @@ -56,10 +56,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test @@ -143,7 +143,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 3.2.7 2.15.2 diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java index 5ba1fd677b1b..84b561f5d1a1 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,9 +16,9 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java index d2267491d2db..2c450738d661 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java index a391586b2e05..e845192af322 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,9 +15,9 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java index c4cfabbaa9a3..a1ac6bca41b5 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Category diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index d304c8ea4f4d..fe096a71a493 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelApiResponse diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java index 2f6b45ae473d..1d7b6c9efb60 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Date; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Order diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java index 89b100680bdd..f6c5afae0f28 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java @@ -22,9 +22,9 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Pet diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java index 24201a29941c..ea7eef0ef318 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Tag diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java index 53f04f7a68ba..be66f08f2536 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java @@ -18,9 +18,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for User diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml index 96d1ecac63c2..b13f78156efd 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml @@ -56,10 +56,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test @@ -152,7 +152,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 3.2.7 2.15.2 diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java index 94de80f0b851..413bef2577f4 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,9 +16,9 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java index 712d7da2c166..6f69331ad6b3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java index 898ba6b799df..5b670bee1808 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,9 +15,9 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java index 3f8a3046a4cc..87654586f9aa 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 31d3ca9f1fbb..8a13c8b98ab8 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java index d80a78086743..806ad96c2819 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.model; import java.util.Date; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java index 68f000a5762f..f2f30fe0353f 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java @@ -17,9 +17,9 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java index 857b97396717..635bf60e12a9 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java index 39dbbf2bf652..b3f2ff996cb9 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml index 0e9d09ffb0a3..7bdf8eff4f0d 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml @@ -56,10 +56,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test @@ -152,7 +152,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 3.2.7 2.15.2 diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java index 5ba1fd677b1b..84b561f5d1a1 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,9 +16,9 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java index d2267491d2db..2c450738d661 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java index a391586b2e05..e845192af322 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,9 +15,9 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java index de8fb5b2ab21..d73012863baa 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Category diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index ec18c3b5a3da..c3e4cbddf7ea 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelApiResponse diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java index 623cc884e229..624f1a480609 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java @@ -14,9 +14,9 @@ package org.openapitools.client.model; import java.util.Date; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Order diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java index 4ed68d492dd2..dc097f2e1913 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java @@ -18,9 +18,9 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Pet diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java index eb425b209607..b8bca50662d8 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Tag diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java index b31687866d73..f113783dea89 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java @@ -13,9 +13,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for User diff --git a/samples/client/petstore/java/microprofile-rest-client/pom.xml b/samples/client/petstore/java/microprofile-rest-client/pom.xml index e73ae7a664a5..c2ec64615ee2 100644 --- a/samples/client/petstore/java/microprofile-rest-client/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client/pom.xml @@ -56,10 +56,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test @@ -152,7 +152,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 3.2.7 2.15.2 diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java index 65f7952b06fb..6e3533ecafb5 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -28,9 +28,9 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java index ca77aa2845c1..ec39b3c4014b 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -26,9 +26,9 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java index d35e2dd537f3..fc94db7a5a0b 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -26,9 +26,9 @@ package org.openapitools.client.api; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java index ed7d3b4b9305..068073fb27b0 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -25,9 +25,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index d234bec47d0c..c0f877bf2a18 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -25,9 +25,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java index dbb897c0ac78..bdaaf7ffb3dc 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java @@ -26,9 +26,9 @@ package org.openapitools.client.model; import java.util.Date; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java index 8c20696b93fe..691a28dc5d6e 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java @@ -29,9 +29,9 @@ import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java index 32733bc2291a..bfa91fd20484 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java @@ -25,9 +25,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java index ba262205259b..f72f93341737 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java @@ -25,9 +25,9 @@ package org.openapitools.client.model; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** From 14c3125c89e8823746e981e146bff32798390997 Mon Sep 17 00:00:00 2001 From: Thorsten Hirsch Date: Thu, 9 May 2024 16:50:39 +0200 Subject: [PATCH 2/9] re-generate samples --- samples/server/petstore/java-microprofile/pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/server/petstore/java-microprofile/pom.xml b/samples/server/petstore/java-microprofile/pom.xml index a3a94a523678..b43eb4c5ae14 100644 --- a/samples/server/petstore/java-microprofile/pom.xml +++ b/samples/server/petstore/java-microprofile/pom.xml @@ -56,10 +56,10 @@ - - junit - junit - ${junit.version} + + org.junit.jupiter + junit-jupiter-api + ${junit-version} test @@ -148,7 +148,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.13.2 + 5.10.2 1.4.14 3.2.7 2.15.2 From b6f9f207c3392c75fb538e5531d186577ad8b7e2 Mon Sep 17 00:00:00 2001 From: Thorsten Hirsch Date: Thu, 9 May 2024 17:31:51 +0200 Subject: [PATCH 3/9] fix junit(DOT)version --- .../src/main/resources/Java/libraries/microprofile/pom.mustache | 2 +- .../main/resources/Java/libraries/microprofile/pom_3.0.mustache | 2 +- .../java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml | 2 +- .../petstore/java/microprofile-rest-client-3.0-jackson/pom.xml | 2 +- .../client/petstore/java/microprofile-rest-client-3.0/pom.xml | 2 +- .../pom.xml | 2 +- samples/client/petstore/java/microprofile-rest-client/pom.xml | 2 +- samples/server/petstore/java-microprofile/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache index 069094c53ff3..47aa6b9e2349 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache @@ -61,7 +61,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache index ae5a6d1fe5c5..3cda34fa7ecb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom_3.0.mustache @@ -61,7 +61,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test {{#useBeanValidation}} diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml index 59a919474d48..aaec1094017b 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/pom.xml @@ -59,7 +59,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml index fc9f8f3c5c97..fedd41b522ca 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/pom.xml @@ -59,7 +59,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml b/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml index b13f78156efd..0f3691d8ca93 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/pom.xml @@ -59,7 +59,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml index 7bdf8eff4f0d..2f7a760809e9 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/pom.xml @@ -59,7 +59,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test diff --git a/samples/client/petstore/java/microprofile-rest-client/pom.xml b/samples/client/petstore/java/microprofile-rest-client/pom.xml index c2ec64615ee2..3fd74e974143 100644 --- a/samples/client/petstore/java/microprofile-rest-client/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client/pom.xml @@ -59,7 +59,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test diff --git a/samples/server/petstore/java-microprofile/pom.xml b/samples/server/petstore/java-microprofile/pom.xml index b43eb4c5ae14..0d7f4876c412 100644 --- a/samples/server/petstore/java-microprofile/pom.xml +++ b/samples/server/petstore/java-microprofile/pom.xml @@ -59,7 +59,7 @@ org.junit.jupiter junit-jupiter-api - ${junit-version} + ${junit.version} test From b4db06250a87daedc13f30882c26a4d0ef171e56 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 May 2024 15:40:08 +0800 Subject: [PATCH 4/9] update tests for java microprofile server --- .../openapitools/server/api/PetApiTest.java | 24 ++++++++-------- .../openapitools/server/api/StoreApiTest.java | 16 +++++------ .../openapitools/server/api/UserApiTest.java | 24 ++++++++-------- .../server/model/CategoryTest.java | 16 +++++------ .../server/model/ModelApiResponseTest.java | 18 ++++++------ .../openapitools/server/model/OrderTest.java | 24 ++++++++-------- .../openapitools/server/model/PetTest.java | 25 +++++++++-------- .../openapitools/server/model/TagTest.java | 16 +++++------ .../openapitools/server/model/UserTest.java | 28 +++++++++---------- 9 files changed, 96 insertions(+), 95 deletions(-) diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/PetApiTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/PetApiTest.java index bb5630f26822..0cd50290f230 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/PetApiTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/PetApiTest.java @@ -16,9 +16,9 @@ import java.io.File; import org.openapitools.server.model.ModelApiResponse; import org.openapitools.server.model.Pet; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -40,7 +40,7 @@ public class PetApiTest { private PetApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { client = RestClientBuilder.newBuilder() .baseUrl(new URL(baseUrl)) @@ -62,7 +62,7 @@ public void addPetTest() { // TODO: test validations Pet pet = null; //Uni response = api.addPet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -81,7 +81,7 @@ public void deletePetTest() { Long petId = null; String apiKey = null; //api.deletePet(petId, apiKey); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -99,7 +99,7 @@ public void findPetsByStatusTest() { // TODO: test validations List status = null; //Uni> response = api.findPetsByStatus(status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -117,7 +117,7 @@ public void findPetsByTagsTest() { // TODO: test validations List tags = null; //Uni> response = api.findPetsByTags(tags); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -135,7 +135,7 @@ public void getPetByIdTest() { // TODO: test validations Long petId = null; //Uni response = api.getPetById(petId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -153,7 +153,7 @@ public void updatePetTest() { // TODO: test validations Pet pet = null; //Uni response = api.updatePet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -173,7 +173,7 @@ public void updatePetWithFormTest() { String name = null; String status = null; //api.updatePetWithForm(petId, name, status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -193,7 +193,7 @@ public void uploadFileTest() { String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; //Uni response = api.uploadFile(petId, additionalMetadata, _file); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/StoreApiTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/StoreApiTest.java index 235789386a89..f2a97d3ef444 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/StoreApiTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/StoreApiTest.java @@ -14,9 +14,9 @@ package org.openapitools.server.api; import org.openapitools.server.model.Order; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -38,7 +38,7 @@ public class StoreApiTest { private StoreApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { client = RestClientBuilder.newBuilder() .baseUrl(new URL(baseUrl)) @@ -60,7 +60,7 @@ public void deleteOrderTest() { // TODO: test validations String orderId = null; //api.deleteOrder(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -77,7 +77,7 @@ public void deleteOrderTest() { public void getInventoryTest() { // TODO: test validations //Uni> response = api.getInventory(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -95,7 +95,7 @@ public void getOrderByIdTest() { // TODO: test validations Long orderId = null; //Uni response = api.getOrderById(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -113,7 +113,7 @@ public void placeOrderTest() { // TODO: test validations Order order = null; //Uni response = api.placeOrder(order); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/UserApiTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/UserApiTest.java index 7fcdffee4d3f..f2f1c6b8d365 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/UserApiTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/api/UserApiTest.java @@ -15,9 +15,9 @@ import java.util.Date; import org.openapitools.server.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -39,7 +39,7 @@ public class UserApiTest { private UserApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { client = RestClientBuilder.newBuilder() .baseUrl(new URL(baseUrl)) @@ -61,7 +61,7 @@ public void createUserTest() { // TODO: test validations User user = null; //api.createUser(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -79,7 +79,7 @@ public void createUsersWithArrayInputTest() { // TODO: test validations List user = null; //api.createUsersWithArrayInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -97,7 +97,7 @@ public void createUsersWithListInputTest() { // TODO: test validations List user = null; //api.createUsersWithListInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -115,7 +115,7 @@ public void deleteUserTest() { // TODO: test validations String username = null; //api.deleteUser(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -133,7 +133,7 @@ public void getUserByNameTest() { // TODO: test validations String username = null; //Uni response = api.getUserByName(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -152,7 +152,7 @@ public void loginUserTest() { String username = null; String password = null; //Uni response = api.loginUser(username, password); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -169,7 +169,7 @@ public void loginUserTest() { public void logoutUserTest() { // TODO: test validations //api.logoutUser(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -188,7 +188,7 @@ public void updateUserTest() { String username = null; User user = null; //api.updateUser(username, user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/CategoryTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/CategoryTest.java index e33d5467b646..771a8adfc10f 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/CategoryTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/CategoryTest.java @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,21 +18,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Category */ -public class CategoryTest { +class CategoryTest { private final Category model = new Category(); /** * Model tests for Category */ @Test - public void testCategory() { + void testCategory() { // TODO: test Category } @@ -40,7 +40,7 @@ public void testCategory() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/ModelApiResponseTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/ModelApiResponseTest.java index 645e75d17cf1..cb93c71c01ab 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/ModelApiResponseTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/ModelApiResponseTest.java @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,21 +18,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for ModelApiResponse */ -public class ModelApiResponseTest { +class ModelApiResponseTest { private final ModelApiResponse model = new ModelApiResponse(); /** * Model tests for ModelApiResponse */ @Test - public void testModelApiResponse() { + void testModelApiResponse() { // TODO: test ModelApiResponse } @@ -40,7 +40,7 @@ public void testModelApiResponse() { * Test the property 'code' */ @Test - public void codeTest() { + void codeTest() { // TODO: test code } @@ -48,7 +48,7 @@ public void codeTest() { * Test the property 'type' */ @Test - public void typeTest() { + void typeTest() { // TODO: test type } @@ -56,7 +56,7 @@ public void typeTest() { * Test the property 'message' */ @Test - public void messageTest() { + void messageTest() { // TODO: test message } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/OrderTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/OrderTest.java index 7cb08aa88b88..7918486f952b 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/OrderTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/OrderTest.java @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -19,21 +19,21 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Date; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Order */ -public class OrderTest { +class OrderTest { private final Order model = new Order(); /** * Model tests for Order */ @Test - public void testOrder() { + void testOrder() { // TODO: test Order } @@ -41,7 +41,7 @@ public void testOrder() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -49,7 +49,7 @@ public void idTest() { * Test the property 'petId' */ @Test - public void petIdTest() { + void petIdTest() { // TODO: test petId } @@ -57,7 +57,7 @@ public void petIdTest() { * Test the property 'quantity' */ @Test - public void quantityTest() { + void quantityTest() { // TODO: test quantity } @@ -65,7 +65,7 @@ public void quantityTest() { * Test the property 'shipDate' */ @Test - public void shipDateTest() { + void shipDateTest() { // TODO: test shipDate } @@ -73,7 +73,7 @@ public void shipDateTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } @@ -81,7 +81,7 @@ public void statusTest() { * Test the property 'complete' */ @Test - public void completeTest() { + void completeTest() { // TODO: test complete } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/PetTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/PetTest.java index b96abf259b75..ed94deb2281a 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/PetTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/PetTest.java @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,20 +23,21 @@ import java.util.List; import org.openapitools.server.model.Category; import org.openapitools.server.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + /** * Model tests for Pet */ -public class PetTest { +class PetTest { private final Pet model = new Pet(); /** * Model tests for Pet */ @Test - public void testPet() { + void testPet() { // TODO: test Pet } @@ -44,7 +45,7 @@ public void testPet() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -52,7 +53,7 @@ public void idTest() { * Test the property 'category' */ @Test - public void categoryTest() { + void categoryTest() { // TODO: test category } @@ -60,7 +61,7 @@ public void categoryTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } @@ -68,7 +69,7 @@ public void nameTest() { * Test the property 'photoUrls' */ @Test - public void photoUrlsTest() { + void photoUrlsTest() { // TODO: test photoUrls } @@ -76,7 +77,7 @@ public void photoUrlsTest() { * Test the property 'tags' */ @Test - public void tagsTest() { + void tagsTest() { // TODO: test tags } @@ -84,7 +85,7 @@ public void tagsTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/TagTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/TagTest.java index d8dc0da8adf2..dcb96e16fcae 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/TagTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/TagTest.java @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,21 +18,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for Tag */ -public class TagTest { +class TagTest { private final Tag model = new Tag(); /** * Model tests for Tag */ @Test - public void testTag() { + void testTag() { // TODO: test Tag } @@ -40,7 +40,7 @@ public void testTag() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/UserTest.java b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/UserTest.java index d541f5f88803..965d74fa03ef 100644 --- a/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/UserTest.java +++ b/samples/server/petstore/java-microprofile/src/test/java/org/openapitools/server/model/UserTest.java @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,21 +18,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for User */ -public class UserTest { +class UserTest { private final User model = new User(); /** * Model tests for User */ @Test - public void testUser() { + void testUser() { // TODO: test User } @@ -40,7 +40,7 @@ public void testUser() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'username' */ @Test - public void usernameTest() { + void usernameTest() { // TODO: test username } @@ -56,7 +56,7 @@ public void usernameTest() { * Test the property 'firstName' */ @Test - public void firstNameTest() { + void firstNameTest() { // TODO: test firstName } @@ -64,7 +64,7 @@ public void firstNameTest() { * Test the property 'lastName' */ @Test - public void lastNameTest() { + void lastNameTest() { // TODO: test lastName } @@ -72,7 +72,7 @@ public void lastNameTest() { * Test the property 'email' */ @Test - public void emailTest() { + void emailTest() { // TODO: test email } @@ -80,7 +80,7 @@ public void emailTest() { * Test the property 'password' */ @Test - public void passwordTest() { + void passwordTest() { // TODO: test password } @@ -88,7 +88,7 @@ public void passwordTest() { * Test the property 'phone' */ @Test - public void phoneTest() { + void phoneTest() { // TODO: test phone } @@ -96,7 +96,7 @@ public void phoneTest() { * Test the property 'userStatus' */ @Test - public void userStatusTest() { + void userStatusTest() { // TODO: test userStatus } From 25c4056f2861cd757eb9b9470fbd986c43e33e6c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 May 2024 17:45:54 +0800 Subject: [PATCH 5/9] update samples --- .../openapitools/client/api/PetApiTest.java | 20 +++++++++---------- .../openapitools/client/api/StoreApiTest.java | 12 +++++------ .../openapitools/client/api/UserApiTest.java | 20 +++++++++---------- .../client/model/CategoryTest.java | 8 ++++---- .../client/model/ModelApiResponseTest.java | 10 +++++----- .../openapitools/client/model/OrderTest.java | 16 +++++++-------- .../openapitools/client/model/PetTest.java | 17 ++++++++-------- .../openapitools/client/model/TagTest.java | 8 ++++---- .../openapitools/client/model/UserTest.java | 20 +++++++++---------- 9 files changed, 66 insertions(+), 65 deletions(-) diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java index 84b561f5d1a1..797c05009b01 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,8 +16,8 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -40,7 +40,7 @@ public class PetApiTest { private PetApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -59,7 +59,7 @@ public void addPetTest() { // TODO: test validations Pet pet = null; //Pet response = api.addPet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -78,7 +78,7 @@ public void deletePetTest() { Long petId = null; String apiKey = null; //api.deletePet(petId, apiKey); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -96,7 +96,7 @@ public void findPetsByStatusTest() { // TODO: test validations List status = null; //List response = api.findPetsByStatus(status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -114,7 +114,7 @@ public void findPetsByTagsTest() { // TODO: test validations List tags = null; //List response = api.findPetsByTags(tags); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -132,7 +132,7 @@ public void getPetByIdTest() { // TODO: test validations Long petId = null; //Pet response = api.getPetById(petId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -150,7 +150,7 @@ public void updatePetTest() { // TODO: test validations Pet pet = null; //Pet response = api.updatePet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -170,7 +170,7 @@ public void updatePetWithFormTest() { String name = null; String status = null; //api.updatePetWithForm(petId, name, status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -190,7 +190,7 @@ public void uploadFileTest() { String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java index 2c450738d661..0dd56e5a8edd 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -38,7 +38,7 @@ public class StoreApiTest { private StoreApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -57,7 +57,7 @@ public void deleteOrderTest() { // TODO: test validations String orderId = null; //api.deleteOrder(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -74,7 +74,7 @@ public void deleteOrderTest() { public void getInventoryTest() { // TODO: test validations //Map response = api.getInventory(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -92,7 +92,7 @@ public void getOrderByIdTest() { // TODO: test validations Long orderId = null; //Order response = api.getOrderById(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -110,7 +110,7 @@ public void placeOrderTest() { // TODO: test validations Order order = null; //Order response = api.placeOrder(order); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java index e845192af322..97dbcb65a746 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,8 +15,8 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -39,7 +39,7 @@ public class UserApiTest { private UserApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -58,7 +58,7 @@ public void createUserTest() { // TODO: test validations User user = null; //api.createUser(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -76,7 +76,7 @@ public void createUsersWithArrayInputTest() { // TODO: test validations List user = null; //api.createUsersWithArrayInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -94,7 +94,7 @@ public void createUsersWithListInputTest() { // TODO: test validations List user = null; //api.createUsersWithListInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -112,7 +112,7 @@ public void deleteUserTest() { // TODO: test validations String username = null; //api.deleteUser(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -130,7 +130,7 @@ public void getUserByNameTest() { // TODO: test validations String username = null; //User response = api.getUserByName(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -149,7 +149,7 @@ public void loginUserTest() { String username = null; String password = null; //String response = api.loginUser(username, password); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -166,7 +166,7 @@ public void loginUserTest() { public void logoutUserTest() { // TODO: test validations //api.logoutUser(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -185,7 +185,7 @@ public void updateUserTest() { String username = null; User user = null; //api.updateUser(username, user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java index a1ac6bca41b5..c90a5364a5f3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -25,14 +25,14 @@ /** * Model tests for Category */ -public class CategoryTest { +class CategoryTest { private final Category model = new Category(); /** * Model tests for Category */ @Test - public void testCategory() { + void testCategory() { // TODO: test Category } @@ -40,7 +40,7 @@ public void testCategory() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index fe096a71a493..ca84c5ea519c 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -25,14 +25,14 @@ /** * Model tests for ModelApiResponse */ -public class ModelApiResponseTest { +class ModelApiResponseTest { private final ModelApiResponse model = new ModelApiResponse(); /** * Model tests for ModelApiResponse */ @Test - public void testModelApiResponse() { + void testModelApiResponse() { // TODO: test ModelApiResponse } @@ -40,7 +40,7 @@ public void testModelApiResponse() { * Test the property 'code' */ @Test - public void codeTest() { + void codeTest() { // TODO: test code } @@ -48,7 +48,7 @@ public void codeTest() { * Test the property 'type' */ @Test - public void typeTest() { + void typeTest() { // TODO: test type } @@ -56,7 +56,7 @@ public void typeTest() { * Test the property 'message' */ @Test - public void messageTest() { + void messageTest() { // TODO: test message } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java index 1d7b6c9efb60..d76f9c3e5435 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/OrderTest.java @@ -26,14 +26,14 @@ /** * Model tests for Order */ -public class OrderTest { +class OrderTest { private final Order model = new Order(); /** * Model tests for Order */ @Test - public void testOrder() { + void testOrder() { // TODO: test Order } @@ -41,7 +41,7 @@ public void testOrder() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -49,7 +49,7 @@ public void idTest() { * Test the property 'petId' */ @Test - public void petIdTest() { + void petIdTest() { // TODO: test petId } @@ -57,7 +57,7 @@ public void petIdTest() { * Test the property 'quantity' */ @Test - public void quantityTest() { + void quantityTest() { // TODO: test quantity } @@ -65,7 +65,7 @@ public void quantityTest() { * Test the property 'shipDate' */ @Test - public void shipDateTest() { + void shipDateTest() { // TODO: test shipDate } @@ -73,7 +73,7 @@ public void shipDateTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } @@ -81,7 +81,7 @@ public void statusTest() { * Test the property 'complete' */ @Test - public void completeTest() { + void completeTest() { // TODO: test complete } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java index f6c5afae0f28..1398113cd875 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/PetTest.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; @@ -29,14 +30,14 @@ /** * Model tests for Pet */ -public class PetTest { +class PetTest { private final Pet model = new Pet(); /** * Model tests for Pet */ @Test - public void testPet() { + void testPet() { // TODO: test Pet } @@ -44,7 +45,7 @@ public void testPet() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -52,7 +53,7 @@ public void idTest() { * Test the property 'category' */ @Test - public void categoryTest() { + void categoryTest() { // TODO: test category } @@ -60,7 +61,7 @@ public void categoryTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } @@ -68,7 +69,7 @@ public void nameTest() { * Test the property 'photoUrls' */ @Test - public void photoUrlsTest() { + void photoUrlsTest() { // TODO: test photoUrls } @@ -76,7 +77,7 @@ public void photoUrlsTest() { * Test the property 'tags' */ @Test - public void tagsTest() { + void tagsTest() { // TODO: test tags } @@ -84,7 +85,7 @@ public void tagsTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java index ea7eef0ef318..2573ba6494f3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/TagTest.java @@ -25,14 +25,14 @@ /** * Model tests for Tag */ -public class TagTest { +class TagTest { private final Tag model = new Tag(); /** * Model tests for Tag */ @Test - public void testTag() { + void testTag() { // TODO: test Tag } @@ -40,7 +40,7 @@ public void testTag() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java index be66f08f2536..3cbc09cd7792 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/test/java/org/openapitools/client/model/UserTest.java @@ -25,14 +25,14 @@ /** * Model tests for User */ -public class UserTest { +class UserTest { private final User model = new User(); /** * Model tests for User */ @Test - public void testUser() { + void testUser() { // TODO: test User } @@ -40,7 +40,7 @@ public void testUser() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'username' */ @Test - public void usernameTest() { + void usernameTest() { // TODO: test username } @@ -56,7 +56,7 @@ public void usernameTest() { * Test the property 'firstName' */ @Test - public void firstNameTest() { + void firstNameTest() { // TODO: test firstName } @@ -64,7 +64,7 @@ public void firstNameTest() { * Test the property 'lastName' */ @Test - public void lastNameTest() { + void lastNameTest() { // TODO: test lastName } @@ -72,7 +72,7 @@ public void lastNameTest() { * Test the property 'email' */ @Test - public void emailTest() { + void emailTest() { // TODO: test email } @@ -80,7 +80,7 @@ public void emailTest() { * Test the property 'password' */ @Test - public void passwordTest() { + void passwordTest() { // TODO: test password } @@ -88,7 +88,7 @@ public void passwordTest() { * Test the property 'phone' */ @Test - public void phoneTest() { + void phoneTest() { // TODO: test phone } @@ -96,7 +96,7 @@ public void phoneTest() { * Test the property 'userStatus' */ @Test - public void userStatusTest() { + void userStatusTest() { // TODO: test userStatus } From c248d390a608f7e4b52425e0aab6376016838a0d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 May 2024 17:49:03 +0800 Subject: [PATCH 6/9] update --- .../openapitools/client/api/PetApiTest.java | 113 ++++++++--------- .../openapitools/client/api/StoreApiTest.java | 63 ++++------ .../openapitools/client/api/UserApiTest.java | 118 +++++++++--------- .../client/model/CategoryTest.java | 21 +--- .../client/model/ModelApiResponseTest.java | 23 +--- .../openapitools/client/model/OrderTest.java | 29 ++--- .../openapitools/client/model/PetTest.java | 30 ++--- .../openapitools/client/model/TagTest.java | 21 +--- .../openapitools/client/model/UserTest.java | 33 ++--- 9 files changed, 179 insertions(+), 272 deletions(-) diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java index 6e3533ecafb5..b77ce18cdeb6 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,8 +16,8 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -40,20 +28,19 @@ import java.util.HashMap; import java.util.List; import java.util.Map; - - +import java.util.Set; /** * OpenAPI Petstore Test * - * API tests for PetApi + * API tests for PetApi */ public class PetApiTest { private PetApi client; private String baseUrl = "http://localhost:9080"; - - @Before + + @BeforeEach public void setup() throws MalformedURLException { client = RestClientBuilder.newBuilder() .baseUrl(new URL(baseUrl)) @@ -65,34 +52,38 @@ public void setup() throws MalformedURLException { /** * Add a new pet to the store * + * + * * @throws ApiException * if the Api call fails */ @Test public void addPetTest() { - // TODO: test validations - Pet body = null; - //void response = api.addPet(body); - //assertNotNull(response); - - + // TODO: test validations + Pet pet = null; + //Pet response = api.addPet(pet); + //Assertions.assertNotNull(response); + + } /** * Deletes a pet * + * + * * @throws ApiException * if the Api call fails */ @Test public void deletePetTest() { - // TODO: test validations + // TODO: test validations Long petId = null; String apiKey = null; - //void response = api.deletePet(petId, apiKey); - //assertNotNull(response); - - + //api.deletePet(petId, apiKey); + //Assertions.assertNotNull(response); + + } /** @@ -105,12 +96,12 @@ public void deletePetTest() { */ @Test public void findPetsByStatusTest() { - // TODO: test validations + // TODO: test validations List status = null; //List response = api.findPetsByStatus(status); - //assertNotNull(response); - - + //Assertions.assertNotNull(response); + + } /** @@ -123,12 +114,12 @@ public void findPetsByStatusTest() { */ @Test public void findPetsByTagsTest() { - // TODO: test validations + // TODO: test validations List tags = null; //List response = api.findPetsByTags(tags); - //assertNotNull(response); - - + //Assertions.assertNotNull(response); + + } /** @@ -141,64 +132,70 @@ public void findPetsByTagsTest() { */ @Test public void getPetByIdTest() { - // TODO: test validations + // TODO: test validations Long petId = null; //Pet response = api.getPetById(petId); - //assertNotNull(response); - - + //Assertions.assertNotNull(response); + + } /** * Update an existing pet * + * + * * @throws ApiException * if the Api call fails */ @Test public void updatePetTest() { - // TODO: test validations - Pet body = null; - //void response = api.updatePet(body); - //assertNotNull(response); - - + // TODO: test validations + Pet pet = null; + //Pet response = api.updatePet(pet); + //Assertions.assertNotNull(response); + + } /** * Updates a pet in the store with form data * + * + * * @throws ApiException * if the Api call fails */ @Test public void updatePetWithFormTest() { - // TODO: test validations + // TODO: test validations Long petId = null; String name = null; String status = null; - //void response = api.updatePetWithForm(petId, name, status); - //assertNotNull(response); - - + //api.updatePetWithForm(petId, name, status); + //Assertions.assertNotNull(response); + + } /** * uploads an image * + * + * * @throws ApiException * if the Api call fails */ @Test public void uploadFileTest() { - // TODO: test validations + // TODO: test validations Long petId = null; String additionalMetadata = null; - org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - //assertNotNull(response); - - + org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + //Assertions.assertNotNull(response); + + } } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java index ec39b3c4014b..f3552677aeb8 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -8,26 +8,14 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -38,20 +26,19 @@ import java.util.HashMap; import java.util.List; import java.util.Map; - - +import java.util.Set; /** * OpenAPI Petstore Test * - * API tests for StoreApi + * API tests for StoreApi */ public class StoreApiTest { private StoreApi client; private String baseUrl = "http://localhost:9080"; - - @Before + + @BeforeEach public void setup() throws MalformedURLException { client = RestClientBuilder.newBuilder() .baseUrl(new URL(baseUrl)) @@ -70,12 +57,12 @@ public void setup() throws MalformedURLException { */ @Test public void deleteOrderTest() { - // TODO: test validations + // TODO: test validations String orderId = null; - //void response = api.deleteOrder(orderId); - //assertNotNull(response); - - + //api.deleteOrder(orderId); + //Assertions.assertNotNull(response); + + } /** @@ -88,11 +75,11 @@ public void deleteOrderTest() { */ @Test public void getInventoryTest() { - // TODO: test validations + // TODO: test validations //Map response = api.getInventory(); - //assertNotNull(response); - - + //Assertions.assertNotNull(response); + + } /** @@ -105,28 +92,30 @@ public void getInventoryTest() { */ @Test public void getOrderByIdTest() { - // TODO: test validations + // TODO: test validations Long orderId = null; //Order response = api.getOrderById(orderId); - //assertNotNull(response); - - + //Assertions.assertNotNull(response); + + } /** * Place an order for a pet * + * + * * @throws ApiException * if the Api call fails */ @Test public void placeOrderTest() { - // TODO: test validations - Order body = null; - //Order response = api.placeOrder(body); - //assertNotNull(response); - - + // TODO: test validations + Order order = null; + //Order response = api.placeOrder(order); + //Assertions.assertNotNull(response); + + } } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java index fc94db7a5a0b..c051762215eb 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -8,26 +8,15 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package org.openapitools.client.api; +import java.util.Date; import org.openapitools.client.model.User; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -38,20 +27,19 @@ import java.util.HashMap; import java.util.List; import java.util.Map; - - +import java.util.Set; /** * OpenAPI Petstore Test * - * API tests for UserApi + * API tests for UserApi */ public class UserApiTest { private UserApi client; private String baseUrl = "http://localhost:9080"; - - @Before + + @BeforeEach public void setup() throws MalformedURLException { client = RestClientBuilder.newBuilder() .baseUrl(new URL(baseUrl)) @@ -70,44 +58,48 @@ public void setup() throws MalformedURLException { */ @Test public void createUserTest() { - // TODO: test validations - User body = null; - //void response = api.createUser(body); - //assertNotNull(response); - - + // TODO: test validations + User user = null; + //api.createUser(user); + //Assertions.assertNotNull(response); + + } /** * Creates list of users with given input array * + * + * * @throws ApiException * if the Api call fails */ @Test public void createUsersWithArrayInputTest() { - // TODO: test validations - List body = null; - //void response = api.createUsersWithArrayInput(body); - //assertNotNull(response); - - + // TODO: test validations + List user = null; + //api.createUsersWithArrayInput(user); + //Assertions.assertNotNull(response); + + } /** * Creates list of users with given input array * + * + * * @throws ApiException * if the Api call fails */ @Test public void createUsersWithListInputTest() { - // TODO: test validations - List body = null; - //void response = api.createUsersWithListInput(body); - //assertNotNull(response); - - + // TODO: test validations + List user = null; + //api.createUsersWithListInput(user); + //Assertions.assertNotNull(response); + + } /** @@ -120,60 +112,66 @@ public void createUsersWithListInputTest() { */ @Test public void deleteUserTest() { - // TODO: test validations + // TODO: test validations String username = null; - //void response = api.deleteUser(username); - //assertNotNull(response); - - + //api.deleteUser(username); + //Assertions.assertNotNull(response); + + } /** * Get user by user name * + * + * * @throws ApiException * if the Api call fails */ @Test public void getUserByNameTest() { - // TODO: test validations + // TODO: test validations String username = null; //User response = api.getUserByName(username); - //assertNotNull(response); - - + //Assertions.assertNotNull(response); + + } /** * Logs user into the system * + * + * * @throws ApiException * if the Api call fails */ @Test public void loginUserTest() { - // TODO: test validations + // TODO: test validations String username = null; String password = null; //String response = api.loginUser(username, password); - //assertNotNull(response); - - + //Assertions.assertNotNull(response); + + } /** * Logs out current logged in user session * + * + * * @throws ApiException * if the Api call fails */ @Test public void logoutUserTest() { - // TODO: test validations - //void response = api.logoutUser(); - //assertNotNull(response); - - + // TODO: test validations + //api.logoutUser(); + //Assertions.assertNotNull(response); + + } /** @@ -186,13 +184,13 @@ public void logoutUserTest() { */ @Test public void updateUserTest() { - // TODO: test validations + // TODO: test validations String username = null; - User body = null; - //void response = api.updateUser(username, body); - //assertNotNull(response); - - + User user = null; + //api.updateUser(username, user); + //Assertions.assertNotNull(response); + + } } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java index 068073fb27b0..d0568f977669 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -29,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Category */ -public class CategoryTest { +class CategoryTest { private final Category model = new Category(); /** * Model tests for Category */ @Test - public void testCategory() { + void testCategory() { // TODO: test Category } @@ -48,7 +35,7 @@ public void testCategory() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -56,7 +43,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index c0f877bf2a18..ddfa78c4ac31 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -29,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for ModelApiResponse */ -public class ModelApiResponseTest { +class ModelApiResponseTest { private final ModelApiResponse model = new ModelApiResponse(); /** * Model tests for ModelApiResponse */ @Test - public void testModelApiResponse() { + void testModelApiResponse() { // TODO: test ModelApiResponse } @@ -48,7 +35,7 @@ public void testModelApiResponse() { * Test the property 'code' */ @Test - public void codeTest() { + void codeTest() { // TODO: test code } @@ -56,7 +43,7 @@ public void codeTest() { * Test the property 'type' */ @Test - public void typeTest() { + void typeTest() { // TODO: test type } @@ -64,7 +51,7 @@ public void typeTest() { * Test the property 'message' */ @Test - public void messageTest() { + void messageTest() { // TODO: test message } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java index bdaaf7ffb3dc..0d23109bd825 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/OrderTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -30,18 +18,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Order */ -public class OrderTest { +class OrderTest { private final Order model = new Order(); /** * Model tests for Order */ @Test - public void testOrder() { + void testOrder() { // TODO: test Order } @@ -49,7 +36,7 @@ public void testOrder() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -57,7 +44,7 @@ public void idTest() { * Test the property 'petId' */ @Test - public void petIdTest() { + void petIdTest() { // TODO: test petId } @@ -65,7 +52,7 @@ public void petIdTest() { * Test the property 'quantity' */ @Test - public void quantityTest() { + void quantityTest() { // TODO: test quantity } @@ -73,7 +60,7 @@ public void quantityTest() { * Test the property 'shipDate' */ @Test - public void shipDateTest() { + void shipDateTest() { // TODO: test shipDate } @@ -81,7 +68,7 @@ public void shipDateTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } @@ -89,7 +76,7 @@ public void statusTest() { * Test the property 'complete' */ @Test - public void completeTest() { + void completeTest() { // TODO: test complete } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java index 691a28dc5d6e..e939e3b1d45a 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/PetTest.java @@ -8,24 +8,13 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package org.openapitools.client.model; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; @@ -33,18 +22,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Pet */ -public class PetTest { +class PetTest { private final Pet model = new Pet(); /** * Model tests for Pet */ @Test - public void testPet() { + void testPet() { // TODO: test Pet } @@ -52,7 +40,7 @@ public void testPet() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -60,7 +48,7 @@ public void idTest() { * Test the property 'category' */ @Test - public void categoryTest() { + void categoryTest() { // TODO: test category } @@ -68,7 +56,7 @@ public void categoryTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } @@ -76,7 +64,7 @@ public void nameTest() { * Test the property 'photoUrls' */ @Test - public void photoUrlsTest() { + void photoUrlsTest() { // TODO: test photoUrls } @@ -84,7 +72,7 @@ public void photoUrlsTest() { * Test the property 'tags' */ @Test - public void tagsTest() { + void tagsTest() { // TODO: test tags } @@ -92,7 +80,7 @@ public void tagsTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java index bfa91fd20484..5131a8a3e889 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/TagTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -29,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Tag */ -public class TagTest { +class TagTest { private final Tag model = new Tag(); /** * Model tests for Tag */ @Test - public void testTag() { + void testTag() { // TODO: test Tag } @@ -48,7 +35,7 @@ public void testTag() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -56,7 +43,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java index f72f93341737..d0d84b127052 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/model/UserTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -29,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for User */ -public class UserTest { +class UserTest { private final User model = new User(); /** * Model tests for User */ @Test - public void testUser() { + void testUser() { // TODO: test User } @@ -48,7 +35,7 @@ public void testUser() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -56,7 +43,7 @@ public void idTest() { * Test the property 'username' */ @Test - public void usernameTest() { + void usernameTest() { // TODO: test username } @@ -64,7 +51,7 @@ public void usernameTest() { * Test the property 'firstName' */ @Test - public void firstNameTest() { + void firstNameTest() { // TODO: test firstName } @@ -72,7 +59,7 @@ public void firstNameTest() { * Test the property 'lastName' */ @Test - public void lastNameTest() { + void lastNameTest() { // TODO: test lastName } @@ -80,7 +67,7 @@ public void lastNameTest() { * Test the property 'email' */ @Test - public void emailTest() { + void emailTest() { // TODO: test email } @@ -88,7 +75,7 @@ public void emailTest() { * Test the property 'password' */ @Test - public void passwordTest() { + void passwordTest() { // TODO: test password } @@ -96,7 +83,7 @@ public void passwordTest() { * Test the property 'phone' */ @Test - public void phoneTest() { + void phoneTest() { // TODO: test phone } @@ -104,7 +91,7 @@ public void phoneTest() { * Test the property 'userStatus' */ @Test - public void userStatusTest() { + void userStatusTest() { // TODO: test userStatus } From e8c9a8d67d05245839975b19395d9d4877557f88 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 May 2024 17:51:05 +0800 Subject: [PATCH 7/9] update --- .../openapitools/client/api/PetApiTest.java | 26 +++++++------- .../openapitools/client/api/StoreApiTest.java | 16 ++++----- .../openapitools/client/api/UserApiTest.java | 34 +++++++++---------- .../client/model/CategoryTest.java | 9 +++-- .../client/model/ModelApiResponseTest.java | 11 +++--- .../openapitools/client/model/OrderTest.java | 17 +++++----- .../openapitools/client/model/PetTest.java | 18 +++++----- .../openapitools/client/model/TagTest.java | 9 +++-- .../openapitools/client/model/UserTest.java | 21 ++++++------ 9 files changed, 75 insertions(+), 86 deletions(-) diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java index 413bef2577f4..797c05009b01 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,8 +16,8 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -30,8 +30,6 @@ import java.util.Map; import java.util.Set; - - /** * OpenAPI Petstore Test * @@ -42,7 +40,7 @@ public class PetApiTest { private PetApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -61,7 +59,7 @@ public void addPetTest() { // TODO: test validations Pet pet = null; //Pet response = api.addPet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -79,8 +77,8 @@ public void deletePetTest() { // TODO: test validations Long petId = null; String apiKey = null; - //void response = api.deletePet(petId, apiKey); - //assertNotNull(response); + //api.deletePet(petId, apiKey); + //Assertions.assertNotNull(response); } @@ -98,7 +96,7 @@ public void findPetsByStatusTest() { // TODO: test validations List status = null; //List response = api.findPetsByStatus(status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -116,7 +114,7 @@ public void findPetsByTagsTest() { // TODO: test validations List tags = null; //List response = api.findPetsByTags(tags); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -134,7 +132,7 @@ public void getPetByIdTest() { // TODO: test validations Long petId = null; //Pet response = api.getPetById(petId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -152,7 +150,7 @@ public void updatePetTest() { // TODO: test validations Pet pet = null; //Pet response = api.updatePet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -171,8 +169,8 @@ public void updatePetWithFormTest() { Long petId = null; String name = null; String status = null; - //void response = api.updatePetWithForm(petId, name, status); - //assertNotNull(response); + //api.updatePetWithForm(petId, name, status); + //Assertions.assertNotNull(response); } @@ -192,7 +190,7 @@ public void uploadFileTest() { String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java index 6f69331ad6b3..0dd56e5a8edd 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -28,8 +28,6 @@ import java.util.Map; import java.util.Set; - - /** * OpenAPI Petstore Test * @@ -40,7 +38,7 @@ public class StoreApiTest { private StoreApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -58,8 +56,8 @@ public void setup() throws MalformedURLException { public void deleteOrderTest() { // TODO: test validations String orderId = null; - //void response = api.deleteOrder(orderId); - //assertNotNull(response); + //api.deleteOrder(orderId); + //Assertions.assertNotNull(response); } @@ -76,7 +74,7 @@ public void deleteOrderTest() { public void getInventoryTest() { // TODO: test validations //Map response = api.getInventory(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -94,7 +92,7 @@ public void getOrderByIdTest() { // TODO: test validations Long orderId = null; //Order response = api.getOrderById(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -112,7 +110,7 @@ public void placeOrderTest() { // TODO: test validations Order order = null; //Order response = api.placeOrder(order); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java index 5b670bee1808..97dbcb65a746 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,8 +15,8 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -29,8 +29,6 @@ import java.util.Map; import java.util.Set; - - /** * OpenAPI Petstore Test * @@ -41,7 +39,7 @@ public class UserApiTest { private UserApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -59,8 +57,8 @@ public void setup() throws MalformedURLException { public void createUserTest() { // TODO: test validations User user = null; - //void response = api.createUser(user); - //assertNotNull(response); + //api.createUser(user); + //Assertions.assertNotNull(response); } @@ -77,8 +75,8 @@ public void createUserTest() { public void createUsersWithArrayInputTest() { // TODO: test validations List user = null; - //void response = api.createUsersWithArrayInput(user); - //assertNotNull(response); + //api.createUsersWithArrayInput(user); + //Assertions.assertNotNull(response); } @@ -95,8 +93,8 @@ public void createUsersWithArrayInputTest() { public void createUsersWithListInputTest() { // TODO: test validations List user = null; - //void response = api.createUsersWithListInput(user); - //assertNotNull(response); + //api.createUsersWithListInput(user); + //Assertions.assertNotNull(response); } @@ -113,8 +111,8 @@ public void createUsersWithListInputTest() { public void deleteUserTest() { // TODO: test validations String username = null; - //void response = api.deleteUser(username); - //assertNotNull(response); + //api.deleteUser(username); + //Assertions.assertNotNull(response); } @@ -132,7 +130,7 @@ public void getUserByNameTest() { // TODO: test validations String username = null; //User response = api.getUserByName(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -151,7 +149,7 @@ public void loginUserTest() { String username = null; String password = null; //String response = api.loginUser(username, password); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -167,8 +165,8 @@ public void loginUserTest() { @Test public void logoutUserTest() { // TODO: test validations - //void response = api.logoutUser(); - //assertNotNull(response); + //api.logoutUser(); + //Assertions.assertNotNull(response); } @@ -186,8 +184,8 @@ public void updateUserTest() { // TODO: test validations String username = null; User user = null; - //void response = api.updateUser(username, user); - //assertNotNull(response); + //api.updateUser(username, user); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java index 87654586f9aa..d0568f977669 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -17,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Category */ -public class CategoryTest { +class CategoryTest { private final Category model = new Category(); /** * Model tests for Category */ @Test - public void testCategory() { + void testCategory() { // TODO: test Category } @@ -36,7 +35,7 @@ public void testCategory() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -44,7 +43,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 8a13c8b98ab8..ddfa78c4ac31 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -17,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for ModelApiResponse */ -public class ModelApiResponseTest { +class ModelApiResponseTest { private final ModelApiResponse model = new ModelApiResponse(); /** * Model tests for ModelApiResponse */ @Test - public void testModelApiResponse() { + void testModelApiResponse() { // TODO: test ModelApiResponse } @@ -36,7 +35,7 @@ public void testModelApiResponse() { * Test the property 'code' */ @Test - public void codeTest() { + void codeTest() { // TODO: test code } @@ -44,7 +43,7 @@ public void codeTest() { * Test the property 'type' */ @Test - public void typeTest() { + void typeTest() { // TODO: test type } @@ -52,7 +51,7 @@ public void typeTest() { * Test the property 'message' */ @Test - public void messageTest() { + void messageTest() { // TODO: test message } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java index 806ad96c2819..0d23109bd825 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/OrderTest.java @@ -18,18 +18,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Order */ -public class OrderTest { +class OrderTest { private final Order model = new Order(); /** * Model tests for Order */ @Test - public void testOrder() { + void testOrder() { // TODO: test Order } @@ -37,7 +36,7 @@ public void testOrder() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -45,7 +44,7 @@ public void idTest() { * Test the property 'petId' */ @Test - public void petIdTest() { + void petIdTest() { // TODO: test petId } @@ -53,7 +52,7 @@ public void petIdTest() { * Test the property 'quantity' */ @Test - public void quantityTest() { + void quantityTest() { // TODO: test quantity } @@ -61,7 +60,7 @@ public void quantityTest() { * Test the property 'shipDate' */ @Test - public void shipDateTest() { + void shipDateTest() { // TODO: test shipDate } @@ -69,7 +68,7 @@ public void shipDateTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } @@ -77,7 +76,7 @@ public void statusTest() { * Test the property 'complete' */ @Test - public void completeTest() { + void completeTest() { // TODO: test complete } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java index f2f30fe0353f..e939e3b1d45a 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/PetTest.java @@ -14,6 +14,7 @@ package org.openapitools.client.model; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; @@ -21,18 +22,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Pet */ -public class PetTest { +class PetTest { private final Pet model = new Pet(); /** * Model tests for Pet */ @Test - public void testPet() { + void testPet() { // TODO: test Pet } @@ -40,7 +40,7 @@ public void testPet() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'category' */ @Test - public void categoryTest() { + void categoryTest() { // TODO: test category } @@ -56,7 +56,7 @@ public void categoryTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } @@ -64,7 +64,7 @@ public void nameTest() { * Test the property 'photoUrls' */ @Test - public void photoUrlsTest() { + void photoUrlsTest() { // TODO: test photoUrls } @@ -72,7 +72,7 @@ public void photoUrlsTest() { * Test the property 'tags' */ @Test - public void tagsTest() { + void tagsTest() { // TODO: test tags } @@ -80,7 +80,7 @@ public void tagsTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java index 635bf60e12a9..5131a8a3e889 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/TagTest.java @@ -17,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Tag */ -public class TagTest { +class TagTest { private final Tag model = new Tag(); /** * Model tests for Tag */ @Test - public void testTag() { + void testTag() { // TODO: test Tag } @@ -36,7 +35,7 @@ public void testTag() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -44,7 +43,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java index b3f2ff996cb9..d0d84b127052 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/model/UserTest.java @@ -17,18 +17,17 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for User */ -public class UserTest { +class UserTest { private final User model = new User(); /** * Model tests for User */ @Test - public void testUser() { + void testUser() { // TODO: test User } @@ -36,7 +35,7 @@ public void testUser() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -44,7 +43,7 @@ public void idTest() { * Test the property 'username' */ @Test - public void usernameTest() { + void usernameTest() { // TODO: test username } @@ -52,7 +51,7 @@ public void usernameTest() { * Test the property 'firstName' */ @Test - public void firstNameTest() { + void firstNameTest() { // TODO: test firstName } @@ -60,7 +59,7 @@ public void firstNameTest() { * Test the property 'lastName' */ @Test - public void lastNameTest() { + void lastNameTest() { // TODO: test lastName } @@ -68,7 +67,7 @@ public void lastNameTest() { * Test the property 'email' */ @Test - public void emailTest() { + void emailTest() { // TODO: test email } @@ -76,7 +75,7 @@ public void emailTest() { * Test the property 'password' */ @Test - public void passwordTest() { + void passwordTest() { // TODO: test password } @@ -84,7 +83,7 @@ public void passwordTest() { * Test the property 'phone' */ @Test - public void phoneTest() { + void phoneTest() { // TODO: test phone } @@ -92,7 +91,7 @@ public void phoneTest() { * Test the property 'userStatus' */ @Test - public void userStatusTest() { + void userStatusTest() { // TODO: test userStatus } From 5f8c18247f534fbe4d783729110d4ca4b97588a7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 May 2024 17:51:41 +0800 Subject: [PATCH 8/9] update --- .../openapitools/client/api/PetApiTest.java | 20 +++++++++---------- .../openapitools/client/api/StoreApiTest.java | 12 +++++------ .../openapitools/client/api/UserApiTest.java | 20 +++++++++---------- .../client/model/CategoryTest.java | 8 ++++---- .../client/model/ModelApiResponseTest.java | 10 +++++----- .../openapitools/client/model/OrderTest.java | 16 +++++++-------- .../openapitools/client/model/PetTest.java | 16 +++++++-------- .../openapitools/client/model/TagTest.java | 8 ++++---- .../openapitools/client/model/UserTest.java | 20 +++++++++---------- 9 files changed, 65 insertions(+), 65 deletions(-) diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java index 84b561f5d1a1..797c05009b01 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,8 +16,8 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -40,7 +40,7 @@ public class PetApiTest { private PetApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -59,7 +59,7 @@ public void addPetTest() { // TODO: test validations Pet pet = null; //Pet response = api.addPet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -78,7 +78,7 @@ public void deletePetTest() { Long petId = null; String apiKey = null; //api.deletePet(petId, apiKey); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -96,7 +96,7 @@ public void findPetsByStatusTest() { // TODO: test validations List status = null; //List response = api.findPetsByStatus(status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -114,7 +114,7 @@ public void findPetsByTagsTest() { // TODO: test validations List tags = null; //List response = api.findPetsByTags(tags); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -132,7 +132,7 @@ public void getPetByIdTest() { // TODO: test validations Long petId = null; //Pet response = api.getPetById(petId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -150,7 +150,7 @@ public void updatePetTest() { // TODO: test validations Pet pet = null; //Pet response = api.updatePet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -170,7 +170,7 @@ public void updatePetWithFormTest() { String name = null; String status = null; //api.updatePetWithForm(petId, name, status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -190,7 +190,7 @@ public void uploadFileTest() { String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java index 2c450738d661..0dd56e5a8edd 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -38,7 +38,7 @@ public class StoreApiTest { private StoreApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -57,7 +57,7 @@ public void deleteOrderTest() { // TODO: test validations String orderId = null; //api.deleteOrder(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -74,7 +74,7 @@ public void deleteOrderTest() { public void getInventoryTest() { // TODO: test validations //Map response = api.getInventory(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -92,7 +92,7 @@ public void getOrderByIdTest() { // TODO: test validations Long orderId = null; //Order response = api.getOrderById(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -110,7 +110,7 @@ public void placeOrderTest() { // TODO: test validations Order order = null; //Order response = api.placeOrder(order); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java index e845192af322..97dbcb65a746 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,8 +15,8 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -39,7 +39,7 @@ public class UserApiTest { private UserApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -58,7 +58,7 @@ public void createUserTest() { // TODO: test validations User user = null; //api.createUser(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -76,7 +76,7 @@ public void createUsersWithArrayInputTest() { // TODO: test validations List user = null; //api.createUsersWithArrayInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -94,7 +94,7 @@ public void createUsersWithListInputTest() { // TODO: test validations List user = null; //api.createUsersWithListInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -112,7 +112,7 @@ public void deleteUserTest() { // TODO: test validations String username = null; //api.deleteUser(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -130,7 +130,7 @@ public void getUserByNameTest() { // TODO: test validations String username = null; //User response = api.getUserByName(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -149,7 +149,7 @@ public void loginUserTest() { String username = null; String password = null; //String response = api.loginUser(username, password); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -166,7 +166,7 @@ public void loginUserTest() { public void logoutUserTest() { // TODO: test validations //api.logoutUser(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -185,7 +185,7 @@ public void updateUserTest() { String username = null; User user = null; //api.updateUser(username, user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java index d73012863baa..d0568f977669 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -20,14 +20,14 @@ /** * Model tests for Category */ -public class CategoryTest { +class CategoryTest { private final Category model = new Category(); /** * Model tests for Category */ @Test - public void testCategory() { + void testCategory() { // TODO: test Category } @@ -35,7 +35,7 @@ public void testCategory() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -43,7 +43,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index c3e4cbddf7ea..ddfa78c4ac31 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -20,14 +20,14 @@ /** * Model tests for ModelApiResponse */ -public class ModelApiResponseTest { +class ModelApiResponseTest { private final ModelApiResponse model = new ModelApiResponse(); /** * Model tests for ModelApiResponse */ @Test - public void testModelApiResponse() { + void testModelApiResponse() { // TODO: test ModelApiResponse } @@ -35,7 +35,7 @@ public void testModelApiResponse() { * Test the property 'code' */ @Test - public void codeTest() { + void codeTest() { // TODO: test code } @@ -43,7 +43,7 @@ public void codeTest() { * Test the property 'type' */ @Test - public void typeTest() { + void typeTest() { // TODO: test type } @@ -51,7 +51,7 @@ public void typeTest() { * Test the property 'message' */ @Test - public void messageTest() { + void messageTest() { // TODO: test message } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java index 624f1a480609..0d23109bd825 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/OrderTest.java @@ -21,14 +21,14 @@ /** * Model tests for Order */ -public class OrderTest { +class OrderTest { private final Order model = new Order(); /** * Model tests for Order */ @Test - public void testOrder() { + void testOrder() { // TODO: test Order } @@ -36,7 +36,7 @@ public void testOrder() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -44,7 +44,7 @@ public void idTest() { * Test the property 'petId' */ @Test - public void petIdTest() { + void petIdTest() { // TODO: test petId } @@ -52,7 +52,7 @@ public void petIdTest() { * Test the property 'quantity' */ @Test - public void quantityTest() { + void quantityTest() { // TODO: test quantity } @@ -60,7 +60,7 @@ public void quantityTest() { * Test the property 'shipDate' */ @Test - public void shipDateTest() { + void shipDateTest() { // TODO: test shipDate } @@ -68,7 +68,7 @@ public void shipDateTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } @@ -76,7 +76,7 @@ public void statusTest() { * Test the property 'complete' */ @Test - public void completeTest() { + void completeTest() { // TODO: test complete } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java index dc097f2e1913..e939e3b1d45a 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/PetTest.java @@ -25,14 +25,14 @@ /** * Model tests for Pet */ -public class PetTest { +class PetTest { private final Pet model = new Pet(); /** * Model tests for Pet */ @Test - public void testPet() { + void testPet() { // TODO: test Pet } @@ -40,7 +40,7 @@ public void testPet() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'category' */ @Test - public void categoryTest() { + void categoryTest() { // TODO: test category } @@ -56,7 +56,7 @@ public void categoryTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } @@ -64,7 +64,7 @@ public void nameTest() { * Test the property 'photoUrls' */ @Test - public void photoUrlsTest() { + void photoUrlsTest() { // TODO: test photoUrls } @@ -72,7 +72,7 @@ public void photoUrlsTest() { * Test the property 'tags' */ @Test - public void tagsTest() { + void tagsTest() { // TODO: test tags } @@ -80,7 +80,7 @@ public void tagsTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java index b8bca50662d8..5131a8a3e889 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/TagTest.java @@ -20,14 +20,14 @@ /** * Model tests for Tag */ -public class TagTest { +class TagTest { private final Tag model = new Tag(); /** * Model tests for Tag */ @Test - public void testTag() { + void testTag() { // TODO: test Tag } @@ -35,7 +35,7 @@ public void testTag() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -43,7 +43,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java index f113783dea89..d0d84b127052 100644 --- a/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter/src/test/java/org/openapitools/client/model/UserTest.java @@ -20,14 +20,14 @@ /** * Model tests for User */ -public class UserTest { +class UserTest { private final User model = new User(); /** * Model tests for User */ @Test - public void testUser() { + void testUser() { // TODO: test User } @@ -35,7 +35,7 @@ public void testUser() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -43,7 +43,7 @@ public void idTest() { * Test the property 'username' */ @Test - public void usernameTest() { + void usernameTest() { // TODO: test username } @@ -51,7 +51,7 @@ public void usernameTest() { * Test the property 'firstName' */ @Test - public void firstNameTest() { + void firstNameTest() { // TODO: test firstName } @@ -59,7 +59,7 @@ public void firstNameTest() { * Test the property 'lastName' */ @Test - public void lastNameTest() { + void lastNameTest() { // TODO: test lastName } @@ -67,7 +67,7 @@ public void lastNameTest() { * Test the property 'email' */ @Test - public void emailTest() { + void emailTest() { // TODO: test email } @@ -75,7 +75,7 @@ public void emailTest() { * Test the property 'password' */ @Test - public void passwordTest() { + void passwordTest() { // TODO: test password } @@ -83,7 +83,7 @@ public void passwordTest() { * Test the property 'phone' */ @Test - public void phoneTest() { + void phoneTest() { // TODO: test phone } @@ -91,7 +91,7 @@ public void phoneTest() { * Test the property 'userStatus' */ @Test - public void userStatusTest() { + void userStatusTest() { // TODO: test userStatus } From a61a8a82078f95d279dc3e78ee21a935f0868501 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 May 2024 17:53:31 +0800 Subject: [PATCH 9/9] update --- .../openapitools/client/api/PetApiTest.java | 20 +++++++++---------- .../openapitools/client/api/StoreApiTest.java | 12 +++++------ .../openapitools/client/api/UserApiTest.java | 20 +++++++++---------- .../client/model/CategoryTest.java | 8 ++++---- .../client/model/ModelApiResponseTest.java | 10 +++++----- .../openapitools/client/model/OrderTest.java | 16 +++++++-------- .../openapitools/client/model/PetTest.java | 17 ++++++++-------- .../openapitools/client/model/TagTest.java | 8 ++++---- .../openapitools/client/model/UserTest.java | 20 +++++++++---------- 9 files changed, 66 insertions(+), 65 deletions(-) diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java index 84b561f5d1a1..797c05009b01 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -16,8 +16,8 @@ import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -40,7 +40,7 @@ public class PetApiTest { private PetApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -59,7 +59,7 @@ public void addPetTest() { // TODO: test validations Pet pet = null; //Pet response = api.addPet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -78,7 +78,7 @@ public void deletePetTest() { Long petId = null; String apiKey = null; //api.deletePet(petId, apiKey); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -96,7 +96,7 @@ public void findPetsByStatusTest() { // TODO: test validations List status = null; //List response = api.findPetsByStatus(status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -114,7 +114,7 @@ public void findPetsByTagsTest() { // TODO: test validations List tags = null; //List response = api.findPetsByTags(tags); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -132,7 +132,7 @@ public void getPetByIdTest() { // TODO: test validations Long petId = null; //Pet response = api.getPetById(petId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -150,7 +150,7 @@ public void updatePetTest() { // TODO: test validations Pet pet = null; //Pet response = api.updatePet(pet); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -170,7 +170,7 @@ public void updatePetWithFormTest() { String name = null; String status = null; //api.updatePetWithForm(petId, name, status); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -190,7 +190,7 @@ public void uploadFileTest() { String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null; //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java index 2c450738d661..0dd56e5a8edd 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -14,8 +14,8 @@ package org.openapitools.client.api; import org.openapitools.client.model.Order; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -38,7 +38,7 @@ public class StoreApiTest { private StoreApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -57,7 +57,7 @@ public void deleteOrderTest() { // TODO: test validations String orderId = null; //api.deleteOrder(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -74,7 +74,7 @@ public void deleteOrderTest() { public void getInventoryTest() { // TODO: test validations //Map response = api.getInventory(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -92,7 +92,7 @@ public void getOrderByIdTest() { // TODO: test validations Long orderId = null; //Order response = api.getOrderById(orderId); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -110,7 +110,7 @@ public void placeOrderTest() { // TODO: test validations Order order = null; //Order response = api.placeOrder(order); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java index e845192af322..97dbcb65a746 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -15,8 +15,8 @@ import java.util.Date; import org.openapitools.client.model.User; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.eclipse.microprofile.rest.client.RestClientBuilder; @@ -39,7 +39,7 @@ public class UserApiTest { private UserApi client; private String baseUrl = "http://localhost:9080"; - @Before + @BeforeEach public void setup() throws MalformedURLException { // TODO initialize the client } @@ -58,7 +58,7 @@ public void createUserTest() { // TODO: test validations User user = null; //api.createUser(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -76,7 +76,7 @@ public void createUsersWithArrayInputTest() { // TODO: test validations List user = null; //api.createUsersWithArrayInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -94,7 +94,7 @@ public void createUsersWithListInputTest() { // TODO: test validations List user = null; //api.createUsersWithListInput(user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -112,7 +112,7 @@ public void deleteUserTest() { // TODO: test validations String username = null; //api.deleteUser(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -130,7 +130,7 @@ public void getUserByNameTest() { // TODO: test validations String username = null; //User response = api.getUserByName(username); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -149,7 +149,7 @@ public void loginUserTest() { String username = null; String password = null; //String response = api.loginUser(username, password); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -166,7 +166,7 @@ public void loginUserTest() { public void logoutUserTest() { // TODO: test validations //api.logoutUser(); - //assertNotNull(response); + //Assertions.assertNotNull(response); } @@ -185,7 +185,7 @@ public void updateUserTest() { String username = null; User user = null; //api.updateUser(username, user); - //assertNotNull(response); + //Assertions.assertNotNull(response); } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java index a1ac6bca41b5..c90a5364a5f3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -25,14 +25,14 @@ /** * Model tests for Category */ -public class CategoryTest { +class CategoryTest { private final Category model = new Category(); /** * Model tests for Category */ @Test - public void testCategory() { + void testCategory() { // TODO: test Category } @@ -40,7 +40,7 @@ public void testCategory() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index fe096a71a493..ca84c5ea519c 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -25,14 +25,14 @@ /** * Model tests for ModelApiResponse */ -public class ModelApiResponseTest { +class ModelApiResponseTest { private final ModelApiResponse model = new ModelApiResponse(); /** * Model tests for ModelApiResponse */ @Test - public void testModelApiResponse() { + void testModelApiResponse() { // TODO: test ModelApiResponse } @@ -40,7 +40,7 @@ public void testModelApiResponse() { * Test the property 'code' */ @Test - public void codeTest() { + void codeTest() { // TODO: test code } @@ -48,7 +48,7 @@ public void codeTest() { * Test the property 'type' */ @Test - public void typeTest() { + void typeTest() { // TODO: test type } @@ -56,7 +56,7 @@ public void typeTest() { * Test the property 'message' */ @Test - public void messageTest() { + void messageTest() { // TODO: test message } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java index 1d7b6c9efb60..d76f9c3e5435 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/OrderTest.java @@ -26,14 +26,14 @@ /** * Model tests for Order */ -public class OrderTest { +class OrderTest { private final Order model = new Order(); /** * Model tests for Order */ @Test - public void testOrder() { + void testOrder() { // TODO: test Order } @@ -41,7 +41,7 @@ public void testOrder() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -49,7 +49,7 @@ public void idTest() { * Test the property 'petId' */ @Test - public void petIdTest() { + void petIdTest() { // TODO: test petId } @@ -57,7 +57,7 @@ public void petIdTest() { * Test the property 'quantity' */ @Test - public void quantityTest() { + void quantityTest() { // TODO: test quantity } @@ -65,7 +65,7 @@ public void quantityTest() { * Test the property 'shipDate' */ @Test - public void shipDateTest() { + void shipDateTest() { // TODO: test shipDate } @@ -73,7 +73,7 @@ public void shipDateTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } @@ -81,7 +81,7 @@ public void statusTest() { * Test the property 'complete' */ @Test - public void completeTest() { + void completeTest() { // TODO: test complete } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java index f6c5afae0f28..1398113cd875 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/PetTest.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; @@ -29,14 +30,14 @@ /** * Model tests for Pet */ -public class PetTest { +class PetTest { private final Pet model = new Pet(); /** * Model tests for Pet */ @Test - public void testPet() { + void testPet() { // TODO: test Pet } @@ -44,7 +45,7 @@ public void testPet() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -52,7 +53,7 @@ public void idTest() { * Test the property 'category' */ @Test - public void categoryTest() { + void categoryTest() { // TODO: test category } @@ -60,7 +61,7 @@ public void categoryTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } @@ -68,7 +69,7 @@ public void nameTest() { * Test the property 'photoUrls' */ @Test - public void photoUrlsTest() { + void photoUrlsTest() { // TODO: test photoUrls } @@ -76,7 +77,7 @@ public void photoUrlsTest() { * Test the property 'tags' */ @Test - public void tagsTest() { + void tagsTest() { // TODO: test tags } @@ -84,7 +85,7 @@ public void tagsTest() { * Test the property 'status' */ @Test - public void statusTest() { + void statusTest() { // TODO: test status } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java index ea7eef0ef318..2573ba6494f3 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/TagTest.java @@ -25,14 +25,14 @@ /** * Model tests for Tag */ -public class TagTest { +class TagTest { private final Tag model = new Tag(); /** * Model tests for Tag */ @Test - public void testTag() { + void testTag() { // TODO: test Tag } @@ -40,7 +40,7 @@ public void testTag() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'name' */ @Test - public void nameTest() { + void nameTest() { // TODO: test name } diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java index be66f08f2536..3cbc09cd7792 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/test/java/org/openapitools/client/model/UserTest.java @@ -25,14 +25,14 @@ /** * Model tests for User */ -public class UserTest { +class UserTest { private final User model = new User(); /** * Model tests for User */ @Test - public void testUser() { + void testUser() { // TODO: test User } @@ -40,7 +40,7 @@ public void testUser() { * Test the property 'id' */ @Test - public void idTest() { + void idTest() { // TODO: test id } @@ -48,7 +48,7 @@ public void idTest() { * Test the property 'username' */ @Test - public void usernameTest() { + void usernameTest() { // TODO: test username } @@ -56,7 +56,7 @@ public void usernameTest() { * Test the property 'firstName' */ @Test - public void firstNameTest() { + void firstNameTest() { // TODO: test firstName } @@ -64,7 +64,7 @@ public void firstNameTest() { * Test the property 'lastName' */ @Test - public void lastNameTest() { + void lastNameTest() { // TODO: test lastName } @@ -72,7 +72,7 @@ public void lastNameTest() { * Test the property 'email' */ @Test - public void emailTest() { + void emailTest() { // TODO: test email } @@ -80,7 +80,7 @@ public void emailTest() { * Test the property 'password' */ @Test - public void passwordTest() { + void passwordTest() { // TODO: test password } @@ -88,7 +88,7 @@ public void passwordTest() { * Test the property 'phone' */ @Test - public void phoneTest() { + void phoneTest() { // TODO: test phone } @@ -96,7 +96,7 @@ public void phoneTest() { * Test the property 'userStatus' */ @Test - public void userStatusTest() { + void userStatusTest() { // TODO: test userStatus }