From a73363fd5387f6676a9952deba1d41b3e5bad3ba Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 5 Nov 2021 17:48:14 +0800 Subject: [PATCH] [java][okhttp] Add spotless maven, gradle plugin (#10785) * add spotless maven plugin * add spotless gradle plug-in * add spotless version --- .../okhttp-gson/build.gradle.mustache | 26 +++ .../Java/libraries/okhttp-gson/pom.mustache | 43 +++++ .../java/okhttp-gson-streaming/build.gradle | 26 +++ .../others/java/okhttp-gson-streaming/pom.xml | 43 +++++ .../build.gradle | 26 +++ .../okhttp-gson-dynamicOperations/pom.xml | 43 +++++ .../okhttp-gson-parcelableModel/build.gradle | 26 +++ .../java/okhttp-gson-parcelableModel/pom.xml | 43 +++++ .../petstore/java/okhttp-gson/build.gradle | 26 +++ .../client/petstore/java/okhttp-gson/pom.xml | 43 +++++ .../openapitools/client/ApiClientTest.java | 46 +++--- .../client/ConfigurationTest.java | 2 +- .../org/openapitools/client/JSONTest.java | 66 +++++--- .../openapitools/client/StringUtilTest.java | 22 +-- .../client/api/AnotherFakeApiTest.java | 24 +-- .../openapitools/client/api/FakeApiTest.java | 152 ++++++++--------- .../api/FakeClassnameTags123ApiTest.java | 24 +-- .../openapitools/client/api/PetApiTest.java | 156 ++++++++++-------- .../openapitools/client/api/StoreApiTest.java | 48 ++---- .../openapitools/client/api/UserApiTest.java | 74 +++------ .../client/auth/ApiKeyAuthTest.java | 13 +- .../client/auth/HttpBasicAuthTest.java | 16 +- .../client/auth/RetryingOAuthTest.java | 109 ++++++------ .../AdditionalPropertiesAnyTypeTest.java | 30 +--- .../model/AdditionalPropertiesArrayTest.java | 31 +--- .../AdditionalPropertiesBooleanTest.java | 30 +--- .../model/AdditionalPropertiesClassTest.java | 35 +--- .../AdditionalPropertiesIntegerTest.java | 30 +--- .../model/AdditionalPropertiesNumberTest.java | 31 +--- .../model/AdditionalPropertiesObjectTest.java | 30 +--- .../model/AdditionalPropertiesStringTest.java | 30 +--- .../openapitools/client/model/AnimalTest.java | 32 +--- .../model/ArrayOfArrayOfNumberOnlyTest.java | 27 +-- .../client/model/ArrayOfNumberOnlyTest.java | 31 +--- .../client/model/ArrayTestTest.java | 39 +---- .../client/model/BigCatAllOfTest.java | 28 +--- .../openapitools/client/model/BigCatTest.java | 42 +---- .../client/model/CapitalizationTest.java | 48 ++---- .../client/model/CatAllOfTest.java | 28 +--- .../openapitools/client/model/CatTest.java | 37 +---- .../client/model/CategoryTest.java | 32 +--- .../client/model/ClassModelTest.java | 28 +--- .../openapitools/client/model/ClientTest.java | 28 +--- .../client/model/DogAllOfTest.java | 28 +--- .../openapitools/client/model/DogTest.java | 37 +---- .../client/model/EnumArraysTest.java | 34 +--- .../client/model/EnumClassTest.java | 17 +- .../client/model/EnumTestTest.java | 45 +---- .../client/model/EnumValueTest.java | 7 +- .../client/model/FileSchemaTestClassTest.java | 34 +--- .../client/model/FormatTestTest.java | 81 ++------- .../client/model/HasOnlyReadOnlyTest.java | 32 +--- .../client/model/MapTestTest.java | 43 +---- ...rtiesAndAdditionalPropertiesClassTest.java | 45 +---- .../client/model/Model200ResponseTest.java | 32 +--- .../client/model/ModelApiResponseTest.java | 36 +--- .../client/model/ModelReturnTest.java | 28 +--- .../openapitools/client/model/NameTest.java | 40 +---- .../client/model/NumberOnlyTest.java | 29 +--- .../openapitools/client/model/OrderTest.java | 49 ++---- .../client/model/OuterCompositeTest.java | 37 +---- .../client/model/OuterEnumTest.java | 17 +- .../openapitools/client/model/PetTest.java | 51 ++---- .../client/model/ReadOnlyFirstTest.java | 32 +--- .../client/model/SpecialModelNameTest.java | 28 +--- .../openapitools/client/model/TagTest.java | 32 +--- .../client/model/TypeHolderDefaultTest.java | 47 +----- .../client/model/TypeHolderExampleTest.java | 47 +----- .../openapitools/client/model/UserTest.java | 56 ++----- .../client/model/XmlItemTest.java | 143 ++++------------ 70 files changed, 1037 insertions(+), 1814 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index 90342173dd6..687a34a2acf 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -3,6 +3,7 @@ apply plugin: 'eclipse' {{#sourceFolder}} apply plugin: 'java' {{/sourceFolder}} +apply plugin: 'com.diffplug.spotless' group = '{{groupId}}' version = '{{artifactVersion}}' @@ -14,6 +15,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.3.+' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' } } @@ -138,3 +140,27 @@ dependencies { javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] } + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index 6cd8e351291..84685f3dc3c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -186,6 +186,48 @@ + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + @@ -363,5 +405,6 @@ {{/useBeanValidation}} 4.13.2 UTF-8 + 2.17.3 diff --git a/samples/client/others/java/okhttp-gson-streaming/build.gradle b/samples/client/others/java/okhttp-gson-streaming/build.gradle index 7cce92f47b4..d016f3c43b0 100644 --- a/samples/client/others/java/okhttp-gson-streaming/build.gradle +++ b/samples/client/others/java/okhttp-gson-streaming/build.gradle @@ -1,6 +1,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' group = 'org.openapitools' version = '1.0' @@ -12,6 +13,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.3.+' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' } } @@ -121,3 +123,27 @@ dependencies { javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] } + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} diff --git a/samples/client/others/java/okhttp-gson-streaming/pom.xml b/samples/client/others/java/okhttp-gson-streaming/pom.xml index 243592e2799..5204f8c8e0c 100644 --- a/samples/client/others/java/okhttp-gson-streaming/pom.xml +++ b/samples/client/others/java/okhttp-gson-streaming/pom.xml @@ -179,6 +179,48 @@ + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + @@ -287,5 +329,6 @@ 1.3.5 4.13.2 UTF-8 + 2.17.3 diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle index 24820c068c0..359107bb133 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle @@ -1,6 +1,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' group = 'org.openapitools' version = '1.0.0' @@ -12,6 +13,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.3.+' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' } } @@ -123,3 +125,27 @@ dependencies { javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] } + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml index 3ce94aa5dd4..9343c2f8ac8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml @@ -179,6 +179,48 @@ + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + @@ -297,5 +339,6 @@ 1.3.5 4.13.2 UTF-8 + 2.17.3 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 8646aedd851..1214fbf86c2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -1,6 +1,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' group = 'org.openapitools' version = '1.0.0' @@ -12,6 +13,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.3.+' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' } } @@ -122,3 +124,27 @@ dependencies { javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] } + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index 3235bef8854..78ceff3bcb5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -179,6 +179,48 @@ + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + @@ -299,5 +341,6 @@ 1.3.5 4.13.2 UTF-8 + 2.17.3 diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index 10b2c272abb..ea20da73a33 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -1,6 +1,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' group = 'org.openapitools' version = '1.0.0' @@ -12,6 +13,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.3.+' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' } } @@ -122,3 +124,27 @@ dependencies { javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] } + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index f3c9b191c95..d0156120e15 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -179,6 +179,48 @@ + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + @@ -292,5 +334,6 @@ 1.3.5 4.13.2 UTF-8 + 2.17.3 diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java index fe038f82b48..9edd0ae7bed 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java @@ -1,17 +1,12 @@ package org.openapitools.client; -import okhttp3.OkHttpClient; -import org.openapitools.client.auth.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.TimeZone; - -import org.junit.*; -import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; +import java.util.*; +import okhttp3.OkHttpClient; +import org.junit.*; +import org.openapitools.client.auth.*; public class ApiClientTest { ApiClient apiClient; @@ -54,16 +49,16 @@ public class ApiClientTest { String[] accepts = {"application/json", "application/xml"}; assertEquals("application/json", apiClient.selectHeaderAccept(accepts)); - accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; + accepts = new String[] {"APPLICATION/XML", "APPLICATION/JSON"}; assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts)); - accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; + accepts = new String[] {"application/xml", "application/json; charset=UTF8"}; assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts)); - accepts = new String[]{"text/plain", "application/xml"}; + accepts = new String[] {"text/plain", "application/xml"}; assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts)); - accepts = new String[]{}; + accepts = new String[] {}; assertNull(apiClient.selectHeaderAccept(accepts)); } @@ -72,16 +67,17 @@ public class ApiClientTest { String[] contentTypes = {"application/json", "application/xml"}; assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; + contentTypes = new String[] {"APPLICATION/JSON", "APPLICATION/XML"}; assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes)); + contentTypes = new String[] {"application/xml", "application/json; charset=UTF8"}; + assertEquals( + "application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[]{"text/plain", "application/xml"}; + contentTypes = new String[] {"text/plain", "application/xml"}; assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes)); - contentTypes = new String[]{}; + contentTypes = new String[] {}; assertNull(apiClient.selectHeaderContentType(contentTypes)); } @@ -293,7 +289,9 @@ public class ApiClientTest { List multiPairs = apiClient.parameterToPairs("multi", name, values); assertEquals(values.size(), multiPairs.size()); for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), multiPairs.get(i).getValue()); + assertEquals( + apiClient.escapeString(apiClient.parameterToString(values.get(i))), + multiPairs.get(i).getValue()); } // all other formats @@ -312,7 +310,9 @@ public class ApiClientTest { // must equal input values assertEquals(values.size(), pairValueSplit.length); for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), pairValueSplit[i]); + assertEquals( + apiClient.escapeString(apiClient.parameterToString(values.get(i))), + pairValueSplit[i]); } } } @@ -337,9 +337,7 @@ public class ApiClientTest { assertThat(apiClient.getHttpClient(), is(not(oldClient))); } - /** - * Tests the invariant that the HttpClient for the ApiClient must never be null - */ + /** Tests the invariant that the HttpClient for the ApiClient must never be null */ @Test(expected = NullPointerException.class) public void testNullHttpClient() { apiClient.setHttpClient(null); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java index f05c230dc75..3d6ab82bd3e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java @@ -1,8 +1,8 @@ package org.openapitools.client; -import org.junit.*; import static org.junit.Assert.*; +import org.junit.*; public class ConfigurationTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java index 1c825e39256..9e6dad1a190 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java @@ -1,10 +1,8 @@ package org.openapitools.client; +import static org.junit.Assert.*; + import com.google.gson.reflect.TypeToken; - -import org.openapitools.client.model.Order; - -import java.lang.Exception; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; import java.text.DateFormat; @@ -14,17 +12,15 @@ import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; - import okio.ByteString; import org.junit.*; +import org.openapitools.client.model.Order; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; import org.threeten.bp.ZoneOffset; import org.threeten.bp.format.DateTimeFormatter; -import static org.junit.Assert.*; - public class JSONTest { private ApiClient apiClient = null; private JSON json = null; @@ -44,13 +40,20 @@ public class JSONTest { assertEquals(str, json.serialize(date)); assertEquals(json.deserialize(str, java.sql.Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T03:49:09.356" + getCurrentTimezoneOffset() + "\"", java.sql.Date.class).toString(), date.toString()); + assertEquals( + json.deserialize( + "\"2015-11-07T03:49:09.356" + getCurrentTimezoneOffset() + "\"", + java.sql.Date.class) + .toString(), + date.toString()); // custom date format: without day DateFormat format = new SimpleDateFormat("yyyy-MM", Locale.ROOT); apiClient.setSqlDateFormat(format); String dateStr = "\"2015-11\""; - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", java.sql.Date.class))); + assertEquals( + dateStr, + json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", java.sql.Date.class))); assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11\"", java.sql.Date.class))); } @@ -85,9 +88,14 @@ public class JSONTest { apiClient.setDateFormat(format); String dateStr = "\"2015-11-07T13:49:09+10:00\""; - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09+00:00\"", Date.class))); - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", Date.class))); - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T00:49:09-03:00\"", Date.class))); + assertEquals( + dateStr, + json.serialize(json.deserialize("\"2015-11-07T03:49:09+00:00\"", Date.class))); + assertEquals( + dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", Date.class))); + assertEquals( + dateStr, + json.serialize(json.deserialize("\"2015-11-07T00:49:09-03:00\"", Date.class))); try { // invalid time zone format @@ -103,16 +111,16 @@ public class JSONTest { } catch (RuntimeException e) { // OK } - } @Test public void testOffsetDateTimeTypeAdapter() { final String str = "\"2016-09-09T08:02:03.123-03:00\""; - OffsetDateTime date = OffsetDateTime.of(2016, 9, 9, 8, 2, 3, 123000000, ZoneOffset.of("-3")); + OffsetDateTime date = + OffsetDateTime.of(2016, 9, 9, 8, 2, 3, 123000000, ZoneOffset.of("-3")); assertEquals(str, json.serialize(date)); - //Use toString() instead of isEqual to verify that the offset is preserved + // Use toString() instead of isEqual to verify that the offset is preserved assertEquals(json.deserialize(str, OffsetDateTime.class).toString(), date.toString()); } @@ -125,7 +133,6 @@ public class JSONTest { assertEquals(json.deserialize(str, LocalDate.class), date); } - @Test public void testDefaultDate() throws Exception { final DateTimeFormatter datetimeFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME; @@ -133,19 +140,20 @@ public class JSONTest { order.setShipDate(datetimeFormat.parse(dateStr, OffsetDateTime.FROM)); String str = json.serialize(order); - Type type = new TypeToken() { }.getType(); + Type type = new TypeToken() {}.getType(); Order o = json.deserialize(str, type); assertEquals(dateStr, datetimeFormat.format(o.getShipDate())); } @Test public void testCustomDate() throws Exception { - final DateTimeFormatter datetimeFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2")); + final DateTimeFormatter datetimeFormat = + DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2")); final String dateStr = "2015-11-07T14:11:05-02:00"; order.setShipDate(datetimeFormat.parse(dateStr, OffsetDateTime.FROM)); String str = json.serialize(order); - Type type = new TypeToken() { }.getType(); + Type type = new TypeToken() {}.getType(); Order o = json.deserialize(str, type); assertEquals(dateStr, datetimeFormat.format(o.getShipDate())); } @@ -160,7 +168,8 @@ public class JSONTest { String serializedBytesWithQuotes = json.serialize(expectedBytes); // Assert - String serializedBytes = serializedBytesWithQuotes.substring(1, serializedBytesWithQuotes.length() - 1); + String serializedBytes = + serializedBytesWithQuotes.substring(1, serializedBytesWithQuotes.length() - 1); if (json.getGson().htmlSafe()) { serializedBytes = serializedBytes.replaceAll("\\\\u003d", "="); } @@ -177,16 +186,18 @@ public class JSONTest { final ByteString expectedByteString = ByteString.of(expectedBytes); final String serializedBytes = expectedByteString.base64(); final String serializedBytesWithQuotes = "\"" + serializedBytes + "\""; - Type type = new TypeToken() { }.getType(); + Type type = new TypeToken() {}.getType(); // Act byte[] actualDeserializedBytes = json.deserialize(serializedBytesWithQuotes, type); // Assert - assertEquals(expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8)); + assertEquals( + expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8)); } - // Obtained 22JAN2018 from stackoverflow answer by PuguaSoft https://stackoverflow.com/questions/11399491/java-timezone-offset + // Obtained 22JAN2018 from stackoverflow answer by PuguaSoft + // https://stackoverflow.com/questions/11399491/java-timezone-offset // Direct link https://stackoverflow.com/a/16680815/3166133 public static String getCurrentTimezoneOffset() { @@ -194,9 +205,14 @@ public class JSONTest { Calendar cal = GregorianCalendar.getInstance(tz, Locale.ROOT); int offsetInMillis = tz.getOffset(cal.getTimeInMillis()); - String offset = String.format(Locale.ROOT,"%02d:%02d", Math.abs(offsetInMillis / 3600000), Math.abs((offsetInMillis / 60000) % 60)); + String offset = + String.format( + Locale.ROOT, + "%02d:%02d", + Math.abs(offsetInMillis / 3600000), + Math.abs((offsetInMillis / 60000) % 60)); offset = (offsetInMillis >= 0 ? "+" : "-") + offset; return offset; } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java index aa7c81759ec..f6b87fbaaa1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java @@ -1,21 +1,21 @@ package org.openapitools.client; -import org.junit.*; import static org.junit.Assert.*; +import org.junit.*; public class StringUtilTest { @Test public void testContainsIgnoreCase() { - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"ABC"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, null)); + assertTrue(StringUtil.containsIgnoreCase(new String[] {"abc"}, "abc")); + assertTrue(StringUtil.containsIgnoreCase(new String[] {"abc"}, "ABC")); + assertTrue(StringUtil.containsIgnoreCase(new String[] {"ABC"}, "abc")); + assertTrue(StringUtil.containsIgnoreCase(new String[] {null, "abc"}, "ABC")); + assertTrue(StringUtil.containsIgnoreCase(new String[] {null, "abc"}, null)); - assertFalse(StringUtil.containsIgnoreCase(new String[]{"abc"}, "def")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, "ABC")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, null)); + assertFalse(StringUtil.containsIgnoreCase(new String[] {"abc"}, "def")); + assertFalse(StringUtil.containsIgnoreCase(new String[] {}, "ABC")); + assertFalse(StringUtil.containsIgnoreCase(new String[] {}, null)); } @Test @@ -27,7 +27,7 @@ public class StringUtilTest { assertEquals("aa bb cc", StringUtil.join(array, " ")); assertEquals("aa\nbb\ncc", StringUtil.join(array, "\n")); - assertEquals("", StringUtil.join(new String[]{}, ",")); - assertEquals("abc", StringUtil.join(new String[]{"abc"}, ",")); + assertEquals("", StringUtil.join(new String[] {}, ",")); + assertEquals("abc", StringUtil.join(new String[] {"abc"}, ",")); } } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 719300bc985..af8a9594410 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -3,42 +3,33 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.api; + +import org.junit.Ignore; +import org.junit.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AnotherFakeApi - */ +/** API tests for AnotherFakeApi */ @Ignore public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); - /** * To test special tags * - * To test special tags and operation ID starting with number + *

To test special tags and operation ID starting with number * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void call123testSpecialTagsTest() throws ApiException { @@ -47,5 +38,4 @@ public class AnotherFakeApiTest { // TODO: test validations } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java index 68036a2ef42..e27079ca0c6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -3,50 +3,43 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.api; -import org.openapitools.client.ApiException; -import java.math.BigDecimal; -import org.openapitools.client.model.Client; + import java.io.File; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import org.junit.Ignore; +import org.junit.Test; +import org.openapitools.client.ApiException; +import org.openapitools.client.model.Client; import org.openapitools.client.model.FileSchemaTestClass; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; import org.openapitools.client.model.XmlItem; -import org.junit.Test; -import org.junit.Ignore; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeApi - */ +/** API tests for FakeApi */ @Ignore public class FakeApiTest { private final FakeApi api = new FakeApi(); - /** * creates an XmlItem * - * this route creates an XmlItem + *

this route creates an XmlItem * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createXmlItemTest() throws ApiException { @@ -55,14 +48,11 @@ public class FakeApiTest { // TODO: test validations } - + /** - * - * * Test serialization of outer boolean types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterBooleanSerializeTest() throws ApiException { @@ -71,14 +61,11 @@ public class FakeApiTest { // TODO: test validations } - + /** - * - * * Test serialization of object with outer number type * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { @@ -87,14 +74,11 @@ public class FakeApiTest { // TODO: test validations } - + /** - * - * * Test serialization of outer number types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterNumberSerializeTest() throws ApiException { @@ -103,14 +87,11 @@ public class FakeApiTest { // TODO: test validations } - + /** - * - * * Test serialization of outer string types * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void fakeOuterStringSerializeTest() throws ApiException { @@ -119,14 +100,11 @@ public class FakeApiTest { // TODO: test validations } - + /** - * - * * For this test, the body for this request much reference a schema named `File`. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { @@ -135,15 +113,8 @@ public class FakeApiTest { // TODO: test validations } - - /** - * - * - * - * - * @throws ApiException - * if the Api call fails - */ + + /** @throws ApiException if the Api call fails */ @Test public void testBodyWithQueryParamsTest() throws ApiException { String query = null; @@ -152,14 +123,13 @@ public class FakeApiTest { // TODO: test validations } - + /** * To test \"client\" model * - * To test \"client\" model + *

To test \"client\" model * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClientModelTest() throws ApiException { @@ -168,14 +138,13 @@ public class FakeApiTest { // TODO: test validations } - + /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + *

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEndpointParametersTest() throws ApiException { @@ -193,18 +162,31 @@ public class FakeApiTest { OffsetDateTime dateTime = null; String password = null; String paramCallback = null; - api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + api.testEndpointParameters( + number, + _double, + patternWithoutDelimiter, + _byte, + integer, + int32, + int64, + _float, + string, + binary, + date, + dateTime, + password, + paramCallback); // TODO: test validations } - + /** * To test enum parameters * - * To test enum parameters + *

To test enum parameters * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testEnumParametersTest() throws ApiException { @@ -216,18 +198,25 @@ public class FakeApiTest { Double enumQueryDouble = null; List enumFormStringArray = null; String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + api.testEnumParameters( + enumHeaderStringArray, + enumHeaderString, + enumQueryStringArray, + enumQueryString, + enumQueryInteger, + enumQueryDouble, + enumFormStringArray, + enumFormString); // TODO: test validations } - + /** * Fake endpoint to test group parameters (optional) * - * Fake endpoint to test group parameters (optional) + *

Fake endpoint to test group parameters (optional) * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testGroupParametersTest() throws ApiException { @@ -245,14 +234,11 @@ public class FakeApiTest { // TODO: test validations } - + /** * test inline additionalProperties * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { @@ -261,14 +247,11 @@ public class FakeApiTest { // TODO: test validations } - + /** * test json serialization of form data * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testJsonFormDataTest() throws ApiException { @@ -278,5 +261,4 @@ public class FakeApiTest { // TODO: test validations } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 72c85cd045f..16b1c5afa71 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -3,42 +3,33 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.api; + +import org.junit.Ignore; +import org.junit.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeClassnameTags123Api - */ +/** API tests for FakeClassnameTags123Api */ @Ignore public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); - /** * To test class name in snake case * - * To test class name in snake case + *

To test class name in snake case * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void testClassnameTest() throws ApiException { @@ -47,5 +38,4 @@ public class FakeClassnameTags123ApiTest { // TODO: test validations } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java index f65184b608c..47f8fed5c86 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -10,45 +10,41 @@ * Do not edit the class manually. */ - package org.openapitools.client.api; -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Pet; -import org.openapitools.client.auth.*; -import org.openapitools.client.model.*; -import org.openapitools.client.*; +import static org.junit.Assert.*; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; import java.lang.reflect.Type; -import java.util.Arrays; import java.util.ArrayList; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.ThreadLocalRandom; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; +import java.util.concurrent.TimeUnit; +import org.junit.*; +import org.openapitools.client.*; +import org.openapitools.client.ApiException; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.model.Pet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.junit.*; - -import static org.junit.Assert.*; - -/** - * API tests for PetApi - */ +/** API tests for PetApi */ public class PetApiTest { private PetApi api = new PetApi(); private final Logger LOG = LoggerFactory.getLogger(PetApiTest.class); - // In the circle.yml file, /etc/host is configured with an entry to resolve petstore.swagger.io to 127.0.0.1 + // In the circle.yml file, /etc/host is configured with an entry to resolve petstore.swagger.io + // to 127.0.0.1 private static String basePath = "http://petstore.swagger.io:80/v2"; @Before @@ -118,27 +114,35 @@ public class PetApiTest { // to store returned Pet or error message/exception final Map result = new HashMap(); - api.getPetByIdAsync(pet.getId(), new ApiCallback() { - @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { - result.put("error", e.getMessage()); - } + api.getPetByIdAsync( + pet.getId(), + new ApiCallback() { + @Override + public void onFailure( + ApiException e, + int statusCode, + Map> responseHeaders) { + result.put("error", e.getMessage()); + } - @Override - public void onSuccess(Pet pet, int statusCode, Map> responseHeaders) { - result.put("pet", pet); - } + @Override + public void onSuccess( + Pet pet, int statusCode, Map> responseHeaders) { + result.put("pet", pet); + } - @Override - public void onUploadProgress(long bytesWritten, long contentLength, boolean done) { - //empty - } + @Override + public void onUploadProgress( + long bytesWritten, long contentLength, boolean done) { + // empty + } - @Override - public void onDownloadProgress(long bytesRead, long contentLength, boolean done) { - //empty - } - }); + @Override + public void onDownloadProgress( + long bytesRead, long contentLength, boolean done) { + // empty + } + }); // wait for the asynchronous call to finish (at most 10 seconds) final int maxTry = 10; @@ -167,27 +171,35 @@ public class PetApiTest { // test getting a nonexistent pet result.clear(); - api.getPetByIdAsync(-10000L, new ApiCallback() { - @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { - result.put("exception", e); - } + api.getPetByIdAsync( + -10000L, + new ApiCallback() { + @Override + public void onFailure( + ApiException e, + int statusCode, + Map> responseHeaders) { + result.put("exception", e); + } - @Override - public void onSuccess(Pet pet, int statusCode, Map> responseHeaders) { - result.put("pet", pet); - } + @Override + public void onSuccess( + Pet pet, int statusCode, Map> responseHeaders) { + result.put("pet", pet); + } - @Override - public void onUploadProgress(long bytesWritten, long contentLength, boolean done) { - //empty - } + @Override + public void onUploadProgress( + long bytesWritten, long contentLength, boolean done) { + // empty + } - @Override - public void onDownloadProgress(long bytesRead, long contentLength, boolean done) { - //empty - } - }); + @Override + public void onDownloadProgress( + long bytesRead, long contentLength, boolean done) { + // empty + } + }); // wait for the asynchronous call to finish (at most 10 seconds) final int maxTry = 10; @@ -272,7 +284,6 @@ public class PetApiTest { api.deletePet(pet2.getId(), null); } - @Test public void testUpdatePet() throws Exception { Pet pet = createPet(); @@ -398,7 +409,8 @@ public class PetApiTest { assertTrue(pet1.hashCode() == pet1.hashCode()); pet2.setName("really-happy"); - pet2.setPhotoUrls(new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"))); + pet2.setPhotoUrls( + new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"))); assertFalse(pet1.equals(pet2)); assertFalse(pet2.equals(pet1)); assertFalse(pet1.hashCode() == (pet2.hashCode())); @@ -406,7 +418,8 @@ public class PetApiTest { assertTrue(pet2.hashCode() == pet2.hashCode()); pet1.setName("really-happy"); - pet1.setPhotoUrls(new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"))); + pet1.setPhotoUrls( + new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"))); assertTrue(pet1.equals(pet2)); assertTrue(pet2.equals(pet1)); assertTrue(pet1.hashCode() == pet2.hashCode()); @@ -414,7 +427,6 @@ public class PetApiTest { assertTrue(pet1.hashCode() == pet1.hashCode()); } - private Pet createPet() { Pet pet = new Pet(); pet.setId(ThreadLocalRandom.current().nextLong(Long.MAX_VALUE)); @@ -425,7 +437,8 @@ public class PetApiTest { pet.setCategory(category); pet.setStatus(Pet.StatusEnum.AVAILABLE); - Set photos = new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2")); + Set photos = + new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2")); pet.setPhotoUrls(photos); return pet; @@ -443,17 +456,14 @@ public class PetApiTest { assertNotNull(actual); assertEquals(expected.getId(), actual.getId()); assertNotNull(actual.getCategory()); - assertEquals(expected.getCategory().getName(), - actual.getCategory().getName()); + assertEquals(expected.getCategory().getName(), actual.getCategory().getName()); } /** - * Assert that the given upload/download progress list satisfies the - * following constraints: - *

- * - List is not empty - * - Byte count should be nondecreasing - * - The last element, and only the last element, should have done=true + * Assert that the given upload/download progress list satisfies the following constraints: + * + *

- List is not empty - Byte count should be nondecreasing - The last element, and only the + * last element, should have done=true */ private void assertValidProgress(List progressList) { assertFalse(progressList.isEmpty()); @@ -463,8 +473,7 @@ public class PetApiTest { for (Progress progress : progressList) { if (prev != null) { if (prev.done || prev.bytes > progress.bytes) { - fail("Progress list out of order at index " + index - + ": " + progressList); + fail("Progress list out of order at index " + index + ": " + progressList); } } prev = progress; @@ -495,7 +504,8 @@ public class PetApiTest { } @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { + public void onFailure( + ApiException e, int statusCode, Map> responseHeaders) { exception = e; this.done = true; this.success = false; diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java index b10e977454f..41c551458ed 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -3,42 +3,35 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.api; + +import java.util.Map; +import org.junit.Ignore; +import org.junit.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Ignore; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for StoreApi - */ +/** API tests for StoreApi */ @Ignore public class StoreApiTest { private final StoreApi api = new StoreApi(); - /** * Delete purchase order by ID * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + *

For valid response try integer IDs with value < 1000. Anything above 1000 or + * nonintegers will generate API errors * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteOrderTest() throws ApiException { @@ -47,14 +40,13 @@ public class StoreApiTest { // TODO: test validations } - + /** * Returns pet inventories by status * - * Returns a map of status codes to quantities + *

Returns a map of status codes to quantities * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getInventoryTest() throws ApiException { @@ -62,14 +54,14 @@ public class StoreApiTest { // TODO: test validations } - + /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + *

For valid response try integer IDs with value <= 5 or > 10. Other values will + * generated exceptions * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getOrderByIdTest() throws ApiException { @@ -78,14 +70,11 @@ public class StoreApiTest { // TODO: test validations } - + /** * Place an order for a pet * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void placeOrderTest() throws ApiException { @@ -94,5 +83,4 @@ public class StoreApiTest { // TODO: test validations } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java index 7c392f77f99..364b90cab31 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -3,42 +3,34 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.api; + +import java.util.List; +import org.junit.Ignore; +import org.junit.Test; import org.openapitools.client.ApiException; import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserApi - */ +/** API tests for UserApi */ @Ignore public class UserApiTest { private final UserApi api = new UserApi(); - /** * Create user * - * This can only be done by the logged in user. + *

This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUserTest() throws ApiException { @@ -47,14 +39,11 @@ public class UserApiTest { // TODO: test validations } - + /** * Creates list of users with given input array * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithArrayInputTest() throws ApiException { @@ -63,14 +52,11 @@ public class UserApiTest { // TODO: test validations } - + /** * Creates list of users with given input array * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void createUsersWithListInputTest() throws ApiException { @@ -79,14 +65,13 @@ public class UserApiTest { // TODO: test validations } - + /** * Delete user * - * This can only be done by the logged in user. + *

This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void deleteUserTest() throws ApiException { @@ -95,14 +80,11 @@ public class UserApiTest { // TODO: test validations } - + /** * Get user by user name * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void getUserByNameTest() throws ApiException { @@ -111,14 +93,11 @@ public class UserApiTest { // TODO: test validations } - + /** * Logs user into the system * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void loginUserTest() throws ApiException { @@ -128,14 +107,11 @@ public class UserApiTest { // TODO: test validations } - + /** * Logs out current logged in user session * - * - * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void logoutUserTest() throws ApiException { @@ -143,14 +119,13 @@ public class UserApiTest { // TODO: test validations } - + /** * Updated user * - * This can only be done by the logged in user. + *

This can only be done by the logged in user. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void updateUserTest() throws ApiException { @@ -160,5 +135,4 @@ public class UserApiTest { // TODO: test validations } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java index da25043b27e..c48579be513 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java @@ -1,14 +1,13 @@ package org.openapitools.client.auth; -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.*; +import org.openapitools.client.Pair; public class ApiKeyAuthTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java index e963ea24f7f..630f85ad37c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java @@ -1,14 +1,13 @@ package org.openapitools.client.auth; -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.*; +import org.openapitools.client.Pair; public class HttpBasicAuthTest { HttpBasicAuth auth = null; @@ -32,7 +31,8 @@ public class HttpBasicAuthTest { assertEquals(0, queryParams.size()); assertEquals(0, cookieParams.size()); assertEquals(1, headerParams.size()); - // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix + // the string below is base64-encoded result of "my-username:my-password" with the "Basic " + // prefix String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; assertEquals(expected, headerParams.get("Authorization")); diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java index dca9b7c69ea..7e0b2bec4b5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/RetryingOAuthTest.java @@ -1,7 +1,19 @@ package org.openapitools.client.auth; -import okhttp3.Interceptor.Chain; +import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.util.Collections; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; import okhttp3.*; +import okhttp3.Interceptor.Chain; import okhttp3.Response.Builder; import org.apache.commons.lang3.reflect.FieldUtils; import org.apache.oltu.oauth2.client.OAuthClient; @@ -14,27 +26,19 @@ import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.util.Collections; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; - -import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - public class RetryingOAuthTest { private RetryingOAuth oauth; @Before public void setUp() throws Exception { - oauth = new RetryingOAuth("_clientId", "_clientSecret", OAuthFlow.accessCode, - "https://token.example.com", Collections.emptyMap()); + oauth = + new RetryingOAuth( + "_clientId", + "_clientSecret", + OAuthFlow.accessCode, + "https://token.example.com", + Collections.emptyMap()); oauth.setAccessToken("expired-access-token"); FieldUtils.writeField(oauth, "oAuthClient", mockOAuthClient(), true); } @@ -48,12 +52,13 @@ public class RetryingOAuthTest { @Test public void testTwoConcurrentRequestsUnauthorized() throws Exception { - Callable callable = new Callable() { - @Override - public Response call() throws Exception { - return oauth.intercept(mockChain()); - } - }; + Callable callable = + new Callable() { + @Override + public Response call() throws Exception { + return oauth.intercept(mockChain()); + } + }; ExecutorService executor = Executors.newFixedThreadPool(2); try { Future response1 = executor.submit(callable); @@ -68,14 +73,16 @@ public class RetryingOAuthTest { private OAuthClient mockOAuthClient() throws OAuthProblemException, OAuthSystemException { OAuthJSONAccessTokenResponse response = mock(OAuthJSONAccessTokenResponse.class); - when(response.getAccessToken()).thenAnswer(new Answer() { - @Override - public String answer(InvocationOnMock invocation) throws Throwable { - // sleep ensures that the bug is triggered. - Thread.sleep(1000); - return "new-access-token"; - } - }); + when(response.getAccessToken()) + .thenAnswer( + new Answer() { + @Override + public String answer(InvocationOnMock invocation) throws Throwable { + // sleep ensures that the bug is triggered. + Thread.sleep(1000); + return "new-access-token"; + } + }); OAuthClient client = mock(OAuthClient.class); when(client.accessToken(any(OAuthClientRequest.class))).thenReturn(response); @@ -85,27 +92,31 @@ public class RetryingOAuthTest { private Chain mockChain() throws IOException { Chain chain = mock(Chain.class); - final Request request = new Request.Builder() - .url("https://api.example.com") - .build(); + final Request request = new Request.Builder().url("https://api.example.com").build(); when(chain.request()).thenReturn(request); - when(chain.proceed(any(Request.class))).thenAnswer(new Answer() { - @Override - public Response answer(InvocationOnMock inv) { - Request r = inv.getArgument(0); - int responseCode = "Bearer new-access-token".equals(r.header("Authorization")) - ? HttpURLConnection.HTTP_OK - : HttpURLConnection.HTTP_UNAUTHORIZED; - return new Builder() - .protocol(Protocol.HTTP_1_0) - .message("sup") - .request(request) - .body(ResponseBody.create(new byte[0], MediaType.get("application/test"))) - .code(responseCode) - .build(); - } - }); + when(chain.proceed(any(Request.class))) + .thenAnswer( + new Answer() { + @Override + public Response answer(InvocationOnMock inv) { + Request r = inv.getArgument(0); + int responseCode = + "Bearer new-access-token".equals(r.header("Authorization")) + ? HttpURLConnection.HTTP_OK + : HttpURLConnection.HTTP_UNAUTHORIZED; + return new Builder() + .protocol(Protocol.HTTP_1_0) + .message("sup") + .request(request) + .body( + ResponseBody.create( + new byte[0], + MediaType.get("application/test"))) + .code(responseCode) + .build(); + } + }); return chain; } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 656f0577161..430462cf43b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -3,51 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesAnyType - */ +/** Model tests for AdditionalPropertiesAnyType */ public class AdditionalPropertiesAnyTypeTest { private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - /** - * Model tests for AdditionalPropertiesAnyType - */ + /** Model tests for AdditionalPropertiesAnyType */ @Test public void testAdditionalPropertiesAnyType() { // TODO: test AdditionalPropertiesAnyType } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index 4c5bdc4ffad..b9d65fe3eea 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -3,52 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesArray - */ +/** Model tests for AdditionalPropertiesArray */ public class AdditionalPropertiesArrayTest { private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - /** - * Model tests for AdditionalPropertiesArray - */ + /** Model tests for AdditionalPropertiesArray */ @Test public void testAdditionalPropertiesArray() { // TODO: test AdditionalPropertiesArray } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index de976999c63..b06e5479b6b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -3,51 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesBoolean - */ +/** Model tests for AdditionalPropertiesBoolean */ public class AdditionalPropertiesBooleanTest { private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - /** - * Model tests for AdditionalPropertiesBoolean - */ + /** Model tests for AdditionalPropertiesBoolean */ @Test public void testAdditionalPropertiesBoolean() { // TODO: test AdditionalPropertiesBoolean } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 3c18ad38c7e..88d7524b60e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -3,60 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesClass - */ +/** Model tests for AdditionalPropertiesClass */ public class AdditionalPropertiesClassTest { private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); - /** - * Model tests for AdditionalPropertiesClass - */ + /** Model tests for AdditionalPropertiesClass */ @Test public void testAdditionalPropertiesClass() { // TODO: test AdditionalPropertiesClass } - /** - * Test the property 'mapProperty' - */ + /** Test the property 'mapProperty' */ @Test public void mapPropertyTest() { // TODO: test mapProperty } - /** - * Test the property 'mapOfMapProperty' - */ + /** Test the property 'mapOfMapProperty' */ @Test public void mapOfMapPropertyTest() { // TODO: test mapOfMapProperty } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index 712e0c131b1..32c1059ad2a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -3,51 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesInteger - */ +/** Model tests for AdditionalPropertiesInteger */ public class AdditionalPropertiesIntegerTest { private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - /** - * Model tests for AdditionalPropertiesInteger - */ + /** Model tests for AdditionalPropertiesInteger */ @Test public void testAdditionalPropertiesInteger() { // TODO: test AdditionalPropertiesInteger } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index a2039fa83a5..e6a7397cd47 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -3,52 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesNumber - */ +/** Model tests for AdditionalPropertiesNumber */ public class AdditionalPropertiesNumberTest { private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); - /** - * Model tests for AdditionalPropertiesNumber - */ + /** Model tests for AdditionalPropertiesNumber */ @Test public void testAdditionalPropertiesNumber() { // TODO: test AdditionalPropertiesNumber } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index 3c9fe9323b8..d4a8e5ccbd5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -3,51 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesObject - */ +/** Model tests for AdditionalPropertiesObject */ public class AdditionalPropertiesObjectTest { private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); - /** - * Model tests for AdditionalPropertiesObject - */ + /** Model tests for AdditionalPropertiesObject */ @Test public void testAdditionalPropertiesObject() { // TODO: test AdditionalPropertiesObject } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index 3a3942ab84d..7fbf7373e79 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -3,51 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesString - */ +/** Model tests for AdditionalPropertiesString */ public class AdditionalPropertiesStringTest { private final AdditionalPropertiesString model = new AdditionalPropertiesString(); - /** - * Model tests for AdditionalPropertiesString - */ + /** Model tests for AdditionalPropertiesString */ @Test public void testAdditionalPropertiesString() { // TODO: test AdditionalPropertiesString } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java index 30ed464f5e1..3fc1aa69d6d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -3,57 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Animal - */ +/** Model tests for Animal */ public class AnimalTest { private final Animal model = new Animal(); - /** - * Model tests for Animal - */ + /** Model tests for Animal */ @Test public void testAnimal() { // TODO: test Animal } - /** - * Test the property 'className' - */ + /** Test the property 'className' */ @Test public void classNameTest() { // TODO: test className } - /** - * Test the property 'color' - */ + /** Test the property 'color' */ @Test public void colorTest() { // TODO: test color } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 27121aec515..8760f56d594 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -3,49 +3,33 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import org.apache.commons.lang3.builder.EqualsBuilder; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; -/** - * Model tests for ArrayOfArrayOfNumberOnly - */ +/** Model tests for ArrayOfArrayOfNumberOnly */ public class ArrayOfArrayOfNumberOnlyTest { private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); - /** - * Model tests for ArrayOfArrayOfNumberOnly - */ + /** Model tests for ArrayOfArrayOfNumberOnly */ @Test public void test() { // TODO: test ArrayOfArrayOfNumberOnly } - /** - * Test the property 'arrayArrayNumber' - */ + /** Test the property 'arrayArrayNumber' */ @Test public void arrayArrayNumberTest() { BigDecimal b1 = new BigDecimal("12.3"); @@ -68,5 +52,4 @@ public class ArrayOfArrayOfNumberOnlyTest { Assert.assertTrue(model2.equals(model)); } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 2f88d6ad4b9..943881b40a6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -3,52 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for ArrayOfNumberOnly - */ +/** Model tests for ArrayOfNumberOnly */ public class ArrayOfNumberOnlyTest { private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); - /** - * Model tests for ArrayOfNumberOnly - */ + /** Model tests for ArrayOfNumberOnly */ @Test public void testArrayOfNumberOnly() { // TODO: test ArrayOfNumberOnly } - /** - * Test the property 'arrayNumber' - */ + /** Test the property 'arrayNumber' */ @Test public void arrayNumberTest() { // TODO: test arrayNumber } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 3182aa65481..8aa245e54fb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -3,68 +3,43 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for ArrayTest - */ +/** Model tests for ArrayTest */ public class ArrayTestTest { private final ArrayTest model = new ArrayTest(); - /** - * Model tests for ArrayTest - */ + /** Model tests for ArrayTest */ @Test public void testArrayTest() { // TODO: test ArrayTest } - /** - * Test the property 'arrayOfString' - */ + /** Test the property 'arrayOfString' */ @Test public void arrayOfStringTest() { // TODO: test arrayOfString } - /** - * Test the property 'arrayArrayOfInteger' - */ + /** Test the property 'arrayArrayOfInteger' */ @Test public void arrayArrayOfIntegerTest() { // TODO: test arrayArrayOfInteger } - /** - * Test the property 'arrayArrayOfModel' - */ + /** Test the property 'arrayArrayOfModel' */ @Test public void arrayArrayOfModelTest() { // TODO: test arrayArrayOfModel } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java index f7f725106d1..256f7087f38 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java @@ -3,49 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * 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 * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for BigCatAllOf - */ +/** Model tests for BigCatAllOf */ public class BigCatAllOfTest { private final BigCatAllOf model = new BigCatAllOf(); - /** - * Model tests for BigCatAllOf - */ + /** Model tests for BigCatAllOf */ @Test public void testBigCatAllOf() { // TODO: test BigCatAllOf } - /** - * Test the property 'kind' - */ + /** Test the property 'kind' */ @Test public void kindTest() { // TODO: test kind } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatTest.java index 0cb50249725..4591ecd4d6a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -3,75 +3,49 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * 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 * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for BigCat - */ +/** Model tests for BigCat */ public class BigCatTest { private final BigCat model = new BigCat(); - /** - * Model tests for BigCat - */ + /** Model tests for BigCat */ @Test public void testBigCat() { // TODO: test BigCat } - /** - * Test the property 'className' - */ + /** Test the property 'className' */ @Test public void classNameTest() { // TODO: test className } - /** - * Test the property 'color' - */ + /** Test the property 'color' */ @Test public void colorTest() { // TODO: test color } - /** - * Test the property 'declawed' - */ + /** Test the property 'declawed' */ @Test public void declawedTest() { // TODO: test declawed } - /** - * Test the property 'kind' - */ + /** Test the property 'kind' */ @Test public void kindTest() { // TODO: test kind } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java index 1d029ba7c50..d4e6c28023c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -3,89 +3,61 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Capitalization - */ +/** Model tests for Capitalization */ public class CapitalizationTest { private final Capitalization model = new Capitalization(); - /** - * Model tests for Capitalization - */ + /** Model tests for Capitalization */ @Test public void testCapitalization() { // TODO: test Capitalization } - /** - * Test the property 'smallCamel' - */ + /** Test the property 'smallCamel' */ @Test public void smallCamelTest() { // TODO: test smallCamel } - /** - * Test the property 'capitalCamel' - */ + /** Test the property 'capitalCamel' */ @Test public void capitalCamelTest() { // TODO: test capitalCamel } - /** - * Test the property 'smallSnake' - */ + /** Test the property 'smallSnake' */ @Test public void smallSnakeTest() { // TODO: test smallSnake } - /** - * Test the property 'capitalSnake' - */ + /** Test the property 'capitalSnake' */ @Test public void capitalSnakeTest() { // TODO: test capitalSnake } - /** - * Test the property 'scAETHFlowPoints' - */ + /** Test the property 'scAETHFlowPoints' */ @Test public void scAETHFlowPointsTest() { // TODO: test scAETHFlowPoints } - /** - * Test the property 'ATT_NAME' - */ + /** Test the property 'ATT_NAME' */ @Test public void ATT_NAMETest() { // TODO: test ATT_NAME } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 0473dc929e5..ce9fa9c4663 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -3,49 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for CatAllOf - */ +/** Model tests for CatAllOf */ public class CatAllOfTest { private final CatAllOf model = new CatAllOf(); - /** - * Model tests for CatAllOf - */ + /** Model tests for CatAllOf */ @Test public void testCatAllOf() { // TODO: test CatAllOf } - /** - * Test the property 'declawed' - */ + /** Test the property 'declawed' */ @Test public void declawedTest() { // TODO: test declawed } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java index 718bb5b6baf..41fc819a99b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatTest.java @@ -3,66 +3,43 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Cat - */ +/** Model tests for Cat */ public class CatTest { private final Cat model = new Cat(); - /** - * Model tests for Cat - */ + /** Model tests for Cat */ @Test public void testCat() { // TODO: test Cat } - /** - * Test the property 'className' - */ + /** Test the property 'className' */ @Test public void classNameTest() { // TODO: test className } - /** - * Test the property 'color' - */ + /** Test the property 'color' */ @Test public void colorTest() { // TODO: test color } - /** - * Test the property 'declawed' - */ + /** Test the property 'declawed' */ @Test public void declawedTest() { // TODO: test declawed } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java index 79374c54e6f..37048d7a861 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -3,57 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Category - */ +/** Model tests for Category */ public class CategoryTest { private final Category model = new Category(); - /** - * Model tests for Category - */ + /** Model tests for Category */ @Test public void testCategory() { // TODO: test Category } - /** - * Test the property 'id' - */ + /** Test the property 'id' */ @Test public void idTest() { // TODO: test id } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java index 4c66db89c4f..bb4bfead7f9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -3,49 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for ClassModel - */ +/** Model tests for ClassModel */ public class ClassModelTest { private final ClassModel model = new ClassModel(); - /** - * Model tests for ClassModel - */ + /** Model tests for ClassModel */ @Test public void testClassModel() { // TODO: test ClassModel } - /** - * Test the property 'propertyClass' - */ + /** Test the property 'propertyClass' */ @Test public void propertyClassTest() { // TODO: test propertyClass } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java index 1a9f6d6fc9e..ebc46fd2c49 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ClientTest.java @@ -3,49 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Client - */ +/** Model tests for Client */ public class ClientTest { private final Client model = new Client(); - /** - * Model tests for Client - */ + /** Model tests for Client */ @Test public void testClient() { // TODO: test Client } - /** - * Test the property 'client' - */ + /** Test the property 'client' */ @Test public void clientTest() { // TODO: test client } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 7780c14a386..5c7775454c0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -3,49 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for DogAllOf - */ +/** Model tests for DogAllOf */ public class DogAllOfTest { private final DogAllOf model = new DogAllOf(); - /** - * Model tests for DogAllOf - */ + /** Model tests for DogAllOf */ @Test public void testDogAllOf() { // TODO: test DogAllOf } - /** - * Test the property 'breed' - */ + /** Test the property 'breed' */ @Test public void breedTest() { // TODO: test breed } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java index 8392c174564..4c0e461bc95 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogTest.java @@ -3,66 +3,43 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Dog - */ +/** Model tests for Dog */ public class DogTest { private final Dog model = new Dog(); - /** - * Model tests for Dog - */ + /** Model tests for Dog */ @Test public void testDog() { // TODO: test Dog } - /** - * Test the property 'className' - */ + /** Test the property 'className' */ @Test public void classNameTest() { // TODO: test className } - /** - * Test the property 'color' - */ + /** Test the property 'color' */ @Test public void colorTest() { // TODO: test color } - /** - * Test the property 'breed' - */ + /** Test the property 'breed' */ @Test public void breedTest() { // TODO: test breed } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java index a116bb028fc..b9201504fbe 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -3,59 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for EnumArrays - */ +/** Model tests for EnumArrays */ public class EnumArraysTest { private final EnumArrays model = new EnumArrays(); - /** - * Model tests for EnumArrays - */ + /** Model tests for EnumArrays */ @Test public void testEnumArrays() { // TODO: test EnumArrays } - /** - * Test the property 'justSymbol' - */ + /** Test the property 'justSymbol' */ @Test public void justSymbolTest() { // TODO: test justSymbol } - /** - * Test the property 'arrayEnum' - */ + /** Test the property 'arrayEnum' */ @Test public void arrayEnumTest() { // TODO: test arrayEnum } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java index 97855ba723a..e2b56f33f9f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -3,32 +3,23 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for EnumClass - */ +/** Model tests for EnumClass */ public class EnumClassTest { - /** - * Model tests for EnumClass - */ + /** Model tests for EnumClass */ @Test public void testEnumClass() { // TODO: test EnumClass } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java index d43e3cace6d..2bced4c6fdc 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -3,82 +3,55 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.OuterEnum; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for EnumTest - */ +/** Model tests for EnumTest */ public class EnumTestTest { private final EnumTest model = new EnumTest(); - /** - * Model tests for EnumTest - */ + /** Model tests for EnumTest */ @Test public void testEnumTest() { // TODO: test EnumTest } - /** - * Test the property 'enumString' - */ + /** Test the property 'enumString' */ @Test public void enumStringTest() { // TODO: test enumString } - /** - * Test the property 'enumStringRequired' - */ + /** Test the property 'enumStringRequired' */ @Test public void enumStringRequiredTest() { // TODO: test enumStringRequired } - /** - * Test the property 'enumInteger' - */ + /** Test the property 'enumInteger' */ @Test public void enumIntegerTest() { // TODO: test enumInteger } - /** - * Test the property 'enumNumber' - */ + /** Test the property 'enumNumber' */ @Test public void enumNumberTest() { // TODO: test enumNumber } - /** - * Test the property 'outerEnum' - */ + /** Test the property 'outerEnum' */ @Test public void outerEnumTest() { // TODO: test outerEnum } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumValueTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumValueTest.java index 73440e547b2..c69c54780f8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumValueTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumValueTest.java @@ -1,12 +1,11 @@ package org.openapitools.client.model; -import org.junit.Test; - -import com.google.gson.Gson; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import com.google.gson.Gson; +import org.junit.Test; + public class EnumValueTest { @Test diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a960673c616..0f7eba90234 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -3,59 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for FileSchemaTestClass - */ +/** Model tests for FileSchemaTestClass */ public class FileSchemaTestClassTest { private final FileSchemaTestClass model = new FileSchemaTestClass(); - /** - * Model tests for FileSchemaTestClass - */ + /** Model tests for FileSchemaTestClass */ @Test public void testFileSchemaTestClass() { // TODO: test FileSchemaTestClass } - /** - * Test the property 'file' - */ + /** Test the property 'file' */ @Test public void fileTest() { // TODO: test file } - /** - * Test the property 'files' - */ + /** Test the property 'files' */ @Test public void filesTest() { // TODO: test files } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java index 4d5b377c0b4..e96ca5285a3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -3,150 +3,103 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.UUID; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for FormatTest - */ +/** Model tests for FormatTest */ public class FormatTestTest { private final FormatTest model = new FormatTest(); - /** - * Model tests for FormatTest - */ + /** Model tests for FormatTest */ @Test public void testFormatTest() { // TODO: test FormatTest } - /** - * Test the property 'integer' - */ + /** Test the property 'integer' */ @Test public void integerTest() { // TODO: test integer } - /** - * Test the property 'int32' - */ + /** Test the property 'int32' */ @Test public void int32Test() { // TODO: test int32 } - /** - * Test the property 'int64' - */ + /** Test the property 'int64' */ @Test public void int64Test() { // TODO: test int64 } - /** - * Test the property 'number' - */ + /** Test the property 'number' */ @Test public void numberTest() { // TODO: test number } - /** - * Test the property '_float' - */ + /** Test the property '_float' */ @Test public void _floatTest() { // TODO: test _float } - /** - * Test the property '_double' - */ + /** Test the property '_double' */ @Test public void _doubleTest() { // TODO: test _double } - /** - * Test the property 'string' - */ + /** Test the property 'string' */ @Test public void stringTest() { // TODO: test string } - /** - * Test the property '_byte' - */ + /** Test the property '_byte' */ @Test public void _byteTest() { // TODO: test _byte } - /** - * Test the property 'binary' - */ + /** Test the property 'binary' */ @Test public void binaryTest() { // TODO: test binary } - /** - * Test the property 'date' - */ + /** Test the property 'date' */ @Test public void dateTest() { // TODO: test date } - /** - * Test the property 'dateTime' - */ + /** Test the property 'dateTime' */ @Test public void dateTimeTest() { // TODO: test dateTime } - /** - * Test the property 'uuid' - */ + /** Test the property 'uuid' */ @Test public void uuidTest() { // TODO: test uuid } - /** - * Test the property 'password' - */ + /** Test the property 'password' */ @Test public void passwordTest() { // TODO: test password } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index d854c0c9daf..1befaa708c6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -3,57 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for HasOnlyReadOnly - */ +/** Model tests for HasOnlyReadOnly */ public class HasOnlyReadOnlyTest { private final HasOnlyReadOnly model = new HasOnlyReadOnly(); - /** - * Model tests for HasOnlyReadOnly - */ + /** Model tests for HasOnlyReadOnly */ @Test public void testHasOnlyReadOnly() { // TODO: test HasOnlyReadOnly } - /** - * Test the property 'bar' - */ + /** Test the property 'bar' */ @Test public void barTest() { // TODO: test bar } - /** - * Test the property 'foo' - */ + /** Test the property 'foo' */ @Test public void fooTest() { // TODO: test foo } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java index 9f78d486659..9d1fc952d5f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -3,76 +3,49 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for MapTest - */ +/** Model tests for MapTest */ public class MapTestTest { private final MapTest model = new MapTest(); - /** - * Model tests for MapTest - */ + /** Model tests for MapTest */ @Test public void testMapTest() { // TODO: test MapTest } - /** - * Test the property 'mapMapOfString' - */ + /** Test the property 'mapMapOfString' */ @Test public void mapMapOfStringTest() { // TODO: test mapMapOfString } - /** - * Test the property 'mapOfEnumString' - */ + /** Test the property 'mapOfEnumString' */ @Test public void mapOfEnumStringTest() { // TODO: test mapOfEnumString } - /** - * Test the property 'directMap' - */ + /** Test the property 'directMap' */ @Test public void directMapTest() { // TODO: test directMap } - /** - * Test the property 'indirectMap' - */ + /** Test the property 'indirectMap' */ @Test public void indirectMapTest() { // TODO: test indirectMap } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 93829ac8d53..73646592bd5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -3,71 +3,44 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.openapitools.client.model.Animal; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ +/** Model tests for MixedPropertiesAndAdditionalPropertiesClass */ public class MixedPropertiesAndAdditionalPropertiesClassTest { - private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass(); + private final MixedPropertiesAndAdditionalPropertiesClass model = + new MixedPropertiesAndAdditionalPropertiesClass(); - /** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ + /** Model tests for MixedPropertiesAndAdditionalPropertiesClass */ @Test public void testMixedPropertiesAndAdditionalPropertiesClass() { // TODO: test MixedPropertiesAndAdditionalPropertiesClass } - /** - * Test the property 'uuid' - */ + /** Test the property 'uuid' */ @Test public void uuidTest() { // TODO: test uuid } - /** - * Test the property 'dateTime' - */ + /** Test the property 'dateTime' */ @Test public void dateTimeTest() { // TODO: test dateTime } - /** - * Test the property 'map' - */ + /** Test the property 'map' */ @Test public void mapTest() { // TODO: test map } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index dcea5877334..bea71b18c63 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -3,57 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Model200Response - */ +/** Model tests for Model200Response */ public class Model200ResponseTest { private final Model200Response model = new Model200Response(); - /** - * Model tests for Model200Response - */ + /** Model tests for Model200Response */ @Test public void testModel200Response() { // TODO: test Model200Response } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - /** - * Test the property 'propertyClass' - */ + /** Test the property 'propertyClass' */ @Test public void propertyClassTest() { // TODO: test propertyClass } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 46b8648fdcc..e3b5dd76854 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -3,65 +3,43 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for ModelApiResponse - */ +/** Model tests for ModelApiResponse */ public class ModelApiResponseTest { private final ModelApiResponse model = new ModelApiResponse(); - /** - * Model tests for ModelApiResponse - */ + /** Model tests for ModelApiResponse */ @Test public void testModelApiResponse() { // TODO: test ModelApiResponse } - /** - * Test the property 'code' - */ + /** Test the property 'code' */ @Test public void codeTest() { // TODO: test code } - /** - * Test the property 'type' - */ + /** Test the property 'type' */ @Test public void typeTest() { // TODO: test type } - /** - * Test the property 'message' - */ + /** Test the property 'message' */ @Test public void messageTest() { // TODO: test message } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java index 4135ead5686..fac09a012c1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -3,49 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for ModelReturn - */ +/** Model tests for ModelReturn */ public class ModelReturnTest { private final ModelReturn model = new ModelReturn(); - /** - * Model tests for ModelReturn - */ + /** Model tests for ModelReturn */ @Test public void testModelReturn() { // TODO: test ModelReturn } - /** - * Test the property '_return' - */ + /** Test the property '_return' */ @Test public void _returnTest() { // TODO: test _return } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java index bdc04b000c1..ad86a79a140 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NameTest.java @@ -3,73 +3,49 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Name - */ +/** Model tests for Name */ public class NameTest { private final Name model = new Name(); - /** - * Model tests for Name - */ + /** Model tests for Name */ @Test public void testName() { // TODO: test Name } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - /** - * Test the property 'snakeCase' - */ + /** Test the property 'snakeCase' */ @Test public void snakeCaseTest() { // TODO: test snakeCase } - /** - * Test the property 'property' - */ + /** Test the property 'property' */ @Test public void propertyTest() { // TODO: test property } - /** - * Test the property '_123number' - */ + /** Test the property '_123number' */ @Test public void _123numberTest() { // TODO: test _123number } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 214a6d4538d..c321b5be963 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -3,50 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for NumberOnly - */ +/** Model tests for NumberOnly */ public class NumberOnlyTest { private final NumberOnly model = new NumberOnly(); - /** - * Model tests for NumberOnly - */ + /** Model tests for NumberOnly */ @Test public void testNumberOnly() { // TODO: test NumberOnly } - /** - * Test the property 'justNumber' - */ + /** Test the property 'justNumber' */ @Test public void justNumberTest() { // TODO: test justNumber } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java index 808e365efb5..d5a62b67857 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OrderTest.java @@ -3,90 +3,61 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Order - */ +/** Model tests for Order */ public class OrderTest { private final Order model = new Order(); - /** - * Model tests for Order - */ + /** Model tests for Order */ @Test public void testOrder() { // TODO: test Order } - /** - * Test the property 'id' - */ + /** Test the property 'id' */ @Test public void idTest() { // TODO: test id } - /** - * Test the property 'petId' - */ + /** Test the property 'petId' */ @Test public void petIdTest() { // TODO: test petId } - /** - * Test the property 'quantity' - */ + /** Test the property 'quantity' */ @Test public void quantityTest() { // TODO: test quantity } - /** - * Test the property 'shipDate' - */ + /** Test the property 'shipDate' */ @Test public void shipDateTest() { // TODO: test shipDate } - /** - * Test the property 'status' - */ + /** Test the property 'status' */ @Test public void statusTest() { // TODO: test status } - /** - * Test the property 'complete' - */ + /** Test the property 'complete' */ @Test public void completeTest() { // TODO: test complete } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 710bfedd580..55337798231 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -3,66 +3,43 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for OuterComposite - */ +/** Model tests for OuterComposite */ public class OuterCompositeTest { private final OuterComposite model = new OuterComposite(); - /** - * Model tests for OuterComposite - */ + /** Model tests for OuterComposite */ @Test public void testOuterComposite() { // TODO: test OuterComposite } - /** - * Test the property 'myNumber' - */ + /** Test the property 'myNumber' */ @Test public void myNumberTest() { // TODO: test myNumber } - /** - * Test the property 'myString' - */ + /** Test the property 'myString' */ @Test public void myStringTest() { // TODO: test myString } - /** - * Test the property 'myBoolean' - */ + /** Test the property 'myBoolean' */ @Test public void myBooleanTest() { // TODO: test myBoolean } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 064f84b3ff6..ff2a09c9cf5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -3,32 +3,23 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for OuterEnum - */ +/** Model tests for OuterEnum */ public class OuterEnumTest { - /** - * Model tests for OuterEnum - */ + /** Model tests for OuterEnum */ @Test public void testOuterEnum() { // TODO: test OuterEnum } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java index 3f4c1e8365d..1d56dee54d6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java @@ -3,42 +3,24 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -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; - -/** - * Model tests for Pet - */ +/** Model tests for Pet */ public class PetTest { private final Pet model = new Pet(); - /** - * Model tests for Pet - */ + /** Model tests for Pet */ @Test public void testPet() { // test Pet @@ -52,52 +34,39 @@ public class PetTest { Assert.assertTrue(model.equals(model2)); } - /** - * Test the property 'id' - */ + /** Test the property 'id' */ @Test public void idTest() { // TODO: test id } - /** - * Test the property 'category' - */ + /** Test the property 'category' */ @Test public void categoryTest() { // TODO: test category } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - /** - * Test the property 'photoUrls' - */ + /** Test the property 'photoUrls' */ @Test public void photoUrlsTest() { // TODO: test photoUrls } - /** - * Test the property 'tags' - */ + /** Test the property 'tags' */ @Test public void tagsTest() { // TODO: test tags } - /** - * Test the property 'status' - */ + /** Test the property 'status' */ @Test public void statusTest() { // TODO: test status } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index c89b608f609..06598cf3c01 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -3,57 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for ReadOnlyFirst - */ +/** Model tests for ReadOnlyFirst */ public class ReadOnlyFirstTest { private final ReadOnlyFirst model = new ReadOnlyFirst(); - /** - * Model tests for ReadOnlyFirst - */ + /** Model tests for ReadOnlyFirst */ @Test public void testReadOnlyFirst() { // TODO: test ReadOnlyFirst } - /** - * Test the property 'bar' - */ + /** Test the property 'bar' */ @Test public void barTest() { // TODO: test bar } - /** - * Test the property 'baz' - */ + /** Test the property 'baz' */ @Test public void bazTest() { // TODO: test baz } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index d058c884e49..cf92b840b64 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -3,49 +3,31 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for SpecialModelName - */ +/** Model tests for SpecialModelName */ public class SpecialModelNameTest { private final SpecialModelName model = new SpecialModelName(); - /** - * Model tests for SpecialModelName - */ + /** Model tests for SpecialModelName */ @Test public void testSpecialModelName() { // TODO: test SpecialModelName } - /** - * Test the property '$specialPropertyName' - */ + /** Test the property '$specialPropertyName' */ @Test public void $specialPropertyNameTest() { // TODO: test $specialPropertyName } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java index 27acc7ce8e7..09ab515d40f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TagTest.java @@ -3,57 +3,37 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for Tag - */ +/** Model tests for Tag */ public class TagTest { private final Tag model = new Tag(); - /** - * Model tests for Tag - */ + /** Model tests for Tag */ @Test public void testTag() { // TODO: test Tag } - /** - * Test the property 'id' - */ + /** Test the property 'id' */ @Test public void idTest() { // TODO: test id } - /** - * Test the property 'name' - */ + /** Test the property 'name' */ @Test public void nameTest() { // TODO: test name } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index f120407395a..499a89a047f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -3,84 +3,55 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for TypeHolderDefault - */ +/** Model tests for TypeHolderDefault */ public class TypeHolderDefaultTest { private final TypeHolderDefault model = new TypeHolderDefault(); - /** - * Model tests for TypeHolderDefault - */ + /** Model tests for TypeHolderDefault */ @Test public void testTypeHolderDefault() { // TODO: test TypeHolderDefault } - /** - * Test the property 'stringItem' - */ + /** Test the property 'stringItem' */ @Test public void stringItemTest() { // TODO: test stringItem } - /** - * Test the property 'numberItem' - */ + /** Test the property 'numberItem' */ @Test public void numberItemTest() { // TODO: test numberItem } - /** - * Test the property 'integerItem' - */ + /** Test the property 'integerItem' */ @Test public void integerItemTest() { // TODO: test integerItem } - /** - * Test the property 'boolItem' - */ + /** Test the property 'boolItem' */ @Test public void boolItemTest() { // TODO: test boolItem } - /** - * Test the property 'arrayItem' - */ + /** Test the property 'arrayItem' */ @Test public void arrayItemTest() { // TODO: test arrayItem } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index 5e99dff0cae..cc6e01888bf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -3,84 +3,55 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for TypeHolderExample - */ +/** Model tests for TypeHolderExample */ public class TypeHolderExampleTest { private final TypeHolderExample model = new TypeHolderExample(); - /** - * Model tests for TypeHolderExample - */ + /** Model tests for TypeHolderExample */ @Test public void testTypeHolderExample() { // TODO: test TypeHolderExample } - /** - * Test the property 'stringItem' - */ + /** Test the property 'stringItem' */ @Test public void stringItemTest() { // TODO: test stringItem } - /** - * Test the property 'numberItem' - */ + /** Test the property 'numberItem' */ @Test public void numberItemTest() { // TODO: test numberItem } - /** - * Test the property 'integerItem' - */ + /** Test the property 'integerItem' */ @Test public void integerItemTest() { // TODO: test integerItem } - /** - * Test the property 'boolItem' - */ + /** Test the property 'boolItem' */ @Test public void boolItemTest() { // TODO: test boolItem } - /** - * Test the property 'arrayItem' - */ + /** Test the property 'arrayItem' */ @Test public void arrayItemTest() { // TODO: test arrayItem } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java index da1c9bda4b5..b388f3e0a93 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/UserTest.java @@ -3,105 +3,73 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for User - */ +/** Model tests for User */ public class UserTest { private final User model = new User(); - /** - * Model tests for User - */ + /** Model tests for User */ @Test public void testUser() { // TODO: test User } - /** - * Test the property 'id' - */ + /** Test the property 'id' */ @Test public void idTest() { // TODO: test id } - /** - * Test the property 'username' - */ + /** Test the property 'username' */ @Test public void usernameTest() { // TODO: test username } - /** - * Test the property 'firstName' - */ + /** Test the property 'firstName' */ @Test public void firstNameTest() { // TODO: test firstName } - /** - * Test the property 'lastName' - */ + /** Test the property 'lastName' */ @Test public void lastNameTest() { // TODO: test lastName } - /** - * Test the property 'email' - */ + /** Test the property 'email' */ @Test public void emailTest() { // TODO: test email } - /** - * Test the property 'password' - */ + /** Test the property 'password' */ @Test public void passwordTest() { // TODO: test password } - /** - * Test the property 'phone' - */ + /** Test the property 'phone' */ @Test public void phoneTest() { // TODO: test phone } - /** - * Test the property 'userStatus' - */ + /** Test the property 'userStatus' */ @Test public void userStatusTest() { // TODO: test userStatus } - } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/XmlItemTest.java index 7ecbaf4fa98..e8ab601c066 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -3,276 +3,199 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - package org.openapitools.client.model; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; + import org.junit.Test; - -/** - * Model tests for XmlItem - */ +/** Model tests for XmlItem */ public class XmlItemTest { private final XmlItem model = new XmlItem(); - /** - * Model tests for XmlItem - */ + /** Model tests for XmlItem */ @Test public void testXmlItem() { // TODO: test XmlItem } - /** - * Test the property 'attributeString' - */ + /** Test the property 'attributeString' */ @Test public void attributeStringTest() { // TODO: test attributeString } - /** - * Test the property 'attributeNumber' - */ + /** Test the property 'attributeNumber' */ @Test public void attributeNumberTest() { // TODO: test attributeNumber } - /** - * Test the property 'attributeInteger' - */ + /** Test the property 'attributeInteger' */ @Test public void attributeIntegerTest() { // TODO: test attributeInteger } - /** - * Test the property 'attributeBoolean' - */ + /** Test the property 'attributeBoolean' */ @Test public void attributeBooleanTest() { // TODO: test attributeBoolean } - /** - * Test the property 'wrappedArray' - */ + /** Test the property 'wrappedArray' */ @Test public void wrappedArrayTest() { // TODO: test wrappedArray } - /** - * Test the property 'nameString' - */ + /** Test the property 'nameString' */ @Test public void nameStringTest() { // TODO: test nameString } - /** - * Test the property 'nameNumber' - */ + /** Test the property 'nameNumber' */ @Test public void nameNumberTest() { // TODO: test nameNumber } - /** - * Test the property 'nameInteger' - */ + /** Test the property 'nameInteger' */ @Test public void nameIntegerTest() { // TODO: test nameInteger } - /** - * Test the property 'nameBoolean' - */ + /** Test the property 'nameBoolean' */ @Test public void nameBooleanTest() { // TODO: test nameBoolean } - /** - * Test the property 'nameArray' - */ + /** Test the property 'nameArray' */ @Test public void nameArrayTest() { // TODO: test nameArray } - /** - * Test the property 'nameWrappedArray' - */ + /** Test the property 'nameWrappedArray' */ @Test public void nameWrappedArrayTest() { // TODO: test nameWrappedArray } - /** - * Test the property 'prefixString' - */ + /** Test the property 'prefixString' */ @Test public void prefixStringTest() { // TODO: test prefixString } - /** - * Test the property 'prefixNumber' - */ + /** Test the property 'prefixNumber' */ @Test public void prefixNumberTest() { // TODO: test prefixNumber } - /** - * Test the property 'prefixInteger' - */ + /** Test the property 'prefixInteger' */ @Test public void prefixIntegerTest() { // TODO: test prefixInteger } - /** - * Test the property 'prefixBoolean' - */ + /** Test the property 'prefixBoolean' */ @Test public void prefixBooleanTest() { // TODO: test prefixBoolean } - /** - * Test the property 'prefixArray' - */ + /** Test the property 'prefixArray' */ @Test public void prefixArrayTest() { // TODO: test prefixArray } - /** - * Test the property 'prefixWrappedArray' - */ + /** Test the property 'prefixWrappedArray' */ @Test public void prefixWrappedArrayTest() { // TODO: test prefixWrappedArray } - /** - * Test the property 'namespaceString' - */ + /** Test the property 'namespaceString' */ @Test public void namespaceStringTest() { // TODO: test namespaceString } - /** - * Test the property 'namespaceNumber' - */ + /** Test the property 'namespaceNumber' */ @Test public void namespaceNumberTest() { // TODO: test namespaceNumber } - /** - * Test the property 'namespaceInteger' - */ + /** Test the property 'namespaceInteger' */ @Test public void namespaceIntegerTest() { // TODO: test namespaceInteger } - /** - * Test the property 'namespaceBoolean' - */ + /** Test the property 'namespaceBoolean' */ @Test public void namespaceBooleanTest() { // TODO: test namespaceBoolean } - /** - * Test the property 'namespaceArray' - */ + /** Test the property 'namespaceArray' */ @Test public void namespaceArrayTest() { // TODO: test namespaceArray } - /** - * Test the property 'namespaceWrappedArray' - */ + /** Test the property 'namespaceWrappedArray' */ @Test public void namespaceWrappedArrayTest() { // TODO: test namespaceWrappedArray } - /** - * Test the property 'prefixNsString' - */ + /** Test the property 'prefixNsString' */ @Test public void prefixNsStringTest() { // TODO: test prefixNsString } - /** - * Test the property 'prefixNsNumber' - */ + /** Test the property 'prefixNsNumber' */ @Test public void prefixNsNumberTest() { // TODO: test prefixNsNumber } - /** - * Test the property 'prefixNsInteger' - */ + /** Test the property 'prefixNsInteger' */ @Test public void prefixNsIntegerTest() { // TODO: test prefixNsInteger } - /** - * Test the property 'prefixNsBoolean' - */ + /** Test the property 'prefixNsBoolean' */ @Test public void prefixNsBooleanTest() { // TODO: test prefixNsBoolean } - /** - * Test the property 'prefixNsArray' - */ + /** Test the property 'prefixNsArray' */ @Test public void prefixNsArrayTest() { // TODO: test prefixNsArray } - /** - * Test the property 'prefixNsWrappedArray' - */ + /** Test the property 'prefixNsWrappedArray' */ @Test public void prefixNsWrappedArrayTest() { // TODO: test prefixNsWrappedArray } - }