[java][okhttp] Add spotless maven, gradle plugin (#10785)

* add spotless maven plugin

* add spotless gradle plug-in

* add spotless version
This commit is contained in:
William Cheng 2021-11-05 17:48:14 +08:00 committed by GitHub
parent 369133a03e
commit a73363fd53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 1037 additions and 1814 deletions

View File

@ -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()
}
}

View File

@ -186,6 +186,48 @@
</execution>
</executions>
</plugin>
<!-- Use spotless plugin to automatically format code, remove unused import, etc
To apply changes directly to the file, run `mvn spotless:apply`
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
-->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>.gitignore</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.8</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
<removeUnusedImports/>
<importOrder/>
</java>
</configuration>
</plugin>
</plugins>
</build>
@ -363,5 +405,6 @@
{{/useBeanValidation}}
<junit-version>4.13.2</junit-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotless.version>2.17.3</spotless.version>
</properties>
</project>

View File

@ -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()
}
}

View File

@ -179,6 +179,48 @@
</execution>
</executions>
</plugin>
<!-- Use spotless plugin to automatically format code, remove unused import, etc
To apply changes directly to the file, run `mvn spotless:apply`
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
-->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>.gitignore</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.8</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
<removeUnusedImports/>
<importOrder/>
</java>
</configuration>
</plugin>
</plugins>
</build>
@ -287,5 +329,6 @@
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
<junit-version>4.13.2</junit-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotless.version>2.17.3</spotless.version>
</properties>
</project>

View File

@ -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()
}
}

View File

@ -179,6 +179,48 @@
</execution>
</executions>
</plugin>
<!-- Use spotless plugin to automatically format code, remove unused import, etc
To apply changes directly to the file, run `mvn spotless:apply`
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
-->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>.gitignore</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.8</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
<removeUnusedImports/>
<importOrder/>
</java>
</configuration>
</plugin>
</plugins>
</build>
@ -297,5 +339,6 @@
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
<junit-version>4.13.2</junit-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotless.version>2.17.3</spotless.version>
</properties>
</project>

View File

@ -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()
}
}

View File

@ -179,6 +179,48 @@
</execution>
</executions>
</plugin>
<!-- Use spotless plugin to automatically format code, remove unused import, etc
To apply changes directly to the file, run `mvn spotless:apply`
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
-->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>.gitignore</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.8</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
<removeUnusedImports/>
<importOrder/>
</java>
</configuration>
</plugin>
</plugins>
</build>
@ -299,5 +341,6 @@
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
<junit-version>4.13.2</junit-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotless.version>2.17.3</spotless.version>
</properties>
</project>

View File

@ -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()
}
}

View File

@ -179,6 +179,48 @@
</execution>
</executions>
</plugin>
<!-- Use spotless plugin to automatically format code, remove unused import, etc
To apply changes directly to the file, run `mvn spotless:apply`
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
-->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>.gitignore</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.8</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
<removeUnusedImports/>
<importOrder/>
</java>
</configuration>
</plugin>
</plugins>
</build>
@ -292,5 +334,6 @@
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
<junit-version>4.13.2</junit-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotless.version>2.17.3</spotless.version>
</properties>
</project>

View File

@ -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<Pair> 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);

View File

@ -1,8 +1,8 @@
package org.openapitools.client;
import org.junit.*;
import static org.junit.Assert.*;
import org.junit.*;
public class ConfigurationTest {
@Test

View File

@ -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<Order>() { }.getType();
Type type = new TypeToken<Order>() {}.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<Order>() { }.getType();
Type type = new TypeToken<Order>() {}.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<byte[]>() { }.getType();
Type type = new TypeToken<byte[]>() {}.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;
}
}
}

View File

@ -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"}, ","));
}
}

View File

@ -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
* <p>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
}
}

View File

@ -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
* <p>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 &#x60;File&#x60;.
*
* @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 \&quot;client\&quot; model
*
* To test \&quot;client\&quot; model
* <p>To test \&quot;client\&quot; 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 假端點 偽のエンドポイント 가짜 엔드 포인트
* <p>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
* <p>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<String> 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)
* <p>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
}
}

View File

@ -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
* <p>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
}
}

View File

@ -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<String, Object> result = new HashMap<String, Object>();
api.getPetByIdAsync(pet.getId(), new ApiCallback<Pet>() {
@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
result.put("error", e.getMessage());
}
api.getPetByIdAsync(
pet.getId(),
new ApiCallback<Pet>() {
@Override
public void onFailure(
ApiException e,
int statusCode,
Map<String, List<String>> responseHeaders) {
result.put("error", e.getMessage());
}
@Override
public void onSuccess(Pet pet, int statusCode, Map<String, List<String>> responseHeaders) {
result.put("pet", pet);
}
@Override
public void onSuccess(
Pet pet, int statusCode, Map<String, List<String>> 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<Pet>() {
@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
result.put("exception", e);
}
api.getPetByIdAsync(
-10000L,
new ApiCallback<Pet>() {
@Override
public void onFailure(
ApiException e,
int statusCode,
Map<String, List<String>> responseHeaders) {
result.put("exception", e);
}
@Override
public void onSuccess(Pet pet, int statusCode, Map<String, List<String>> responseHeaders) {
result.put("pet", pet);
}
@Override
public void onSuccess(
Pet pet, int statusCode, Map<String, List<String>> 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<String> photos = new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
Set<String> 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:
* <p>
* - 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:
*
* <p>- 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<Progress> 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<String, List<String>> responseHeaders) {
public void onFailure(
ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
exception = e;
this.done = true;
this.success = false;

View File

@ -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 &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* <p>For valid response try integer IDs with value &lt; 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
* <p>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 &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* <p>For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 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
}
}

View File

@ -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.
* <p>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.
* <p>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.
* <p>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
}
}

View File

@ -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

View File

@ -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"));

View File

@ -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.<String, String>emptyMap());
oauth =
new RetryingOAuth(
"_clientId",
"_clientSecret",
OAuthFlow.accessCode,
"https://token.example.com",
Collections.<String, String>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<Response> callable = new Callable<Response>() {
@Override
public Response call() throws Exception {
return oauth.intercept(mockChain());
}
};
Callable<Response> callable =
new Callable<Response>() {
@Override
public Response call() throws Exception {
return oauth.intercept(mockChain());
}
};
ExecutorService executor = Executors.newFixedThreadPool(2);
try {
Future<Response> 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<String>() {
@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<String>() {
@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<Response>() {
@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<Response>() {
@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;
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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));
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}