forked from loafle/openapi-generator-original
[Java][okhttp-gson] update junit to 5.8.2 from 4.13.2 (#11882)
* update junit to 5.8.2 in java okhttp-gson client * undo changes to yaml * update samples * update tests * fix indentation * restore tests * update samples
This commit is contained in:
@@ -5,8 +5,8 @@ package {{package}};
|
|||||||
import {{invokerPackage}}.ApiException;
|
import {{invokerPackage}}.ApiException;
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
{{^fullJavaUtil}}
|
{{^fullJavaUtil}}
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -21,19 +21,23 @@ import java.io.InputStream;
|
|||||||
/**
|
/**
|
||||||
* API tests for {{classname}}
|
* API tests for {{classname}}
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class {{classname}}Test {
|
public class {{classname}}Test {
|
||||||
|
|
||||||
private final {{classname}} api = new {{classname}}();
|
private final {{classname}} api = new {{classname}}();
|
||||||
|
|
||||||
{{#operations}}{{#operation}}
|
{{#operations}}
|
||||||
|
{{#operation}}
|
||||||
/**
|
/**
|
||||||
|
{{#summary}}
|
||||||
* {{summary}}
|
* {{summary}}
|
||||||
*
|
*
|
||||||
|
{{/summary}}
|
||||||
|
{{#notes}}
|
||||||
* {{notes}}
|
* {{notes}}
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
{{/notes}}
|
||||||
* if the Api call fails
|
* @throws ApiException if the Api call fails
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void {{operationId}}Test() throws ApiException {
|
public void {{operationId}}Test() throws ApiException {
|
||||||
@@ -41,16 +45,18 @@ public class {{classname}}Test {
|
|||||||
{{{dataType}}} {{paramName}} = null;
|
{{{dataType}}} {{paramName}} = null;
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
{{#vendorExtensions.x-streaming}}
|
{{#vendorExtensions.x-streaming}}
|
||||||
InputStream response = api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}
|
InputStream response = api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}
|
||||||
.{{paramName}}({{paramName}}){{/optionalParams}}
|
.{{paramName}}({{paramName}}){{/optionalParams}}
|
||||||
.execute();{{/vendorExtensions.x-group-parameters}}
|
.execute();{{/vendorExtensions.x-group-parameters}}
|
||||||
{{/vendorExtensions.x-streaming}}
|
{{/vendorExtensions.x-streaming}}
|
||||||
{{^vendorExtensions.x-streaming}}
|
{{^vendorExtensions.x-streaming}}
|
||||||
{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}
|
{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}
|
||||||
.{{paramName}}({{paramName}}){{/optionalParams}}
|
.{{paramName}}({{paramName}}){{/optionalParams}}
|
||||||
.execute();{{/vendorExtensions.x-group-parameters}}
|
.execute();{{/vendorExtensions.x-group-parameters}}
|
||||||
{{/vendorExtensions.x-streaming}}
|
{{/vendorExtensions.x-streaming}}
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
{{/operation}}{{/operations}}
|
|
||||||
|
{{/operation}}
|
||||||
|
{{/operations}}
|
||||||
}
|
}
|
||||||
|
|||||||
49
modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache
vendored
Normal file
49
modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{{>licenseInfo}}
|
||||||
|
|
||||||
|
package {{package}};
|
||||||
|
|
||||||
|
{{#imports}}import {{import}};
|
||||||
|
{{/imports}}
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
{{#fullJavaUtil}}
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
{{/fullJavaUtil}}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for {{classname}}
|
||||||
|
*/
|
||||||
|
public class {{classname}}Test {
|
||||||
|
{{#models}}
|
||||||
|
{{#model}}
|
||||||
|
{{^vendorExtensions.x-is-one-of-interface}}
|
||||||
|
{{^isEnum}}
|
||||||
|
private final {{classname}} model = new {{classname}}();
|
||||||
|
|
||||||
|
{{/isEnum}}
|
||||||
|
/**
|
||||||
|
* Model tests for {{classname}}
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void test{{classname}}() {
|
||||||
|
// TODO: test {{classname}}
|
||||||
|
}
|
||||||
|
|
||||||
|
{{#allVars}}
|
||||||
|
/**
|
||||||
|
* Test the property '{{name}}'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void {{name}}Test() {
|
||||||
|
// TODO: test {{name}}
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/allVars}}
|
||||||
|
{{/vendorExtensions.x-is-one-of-interface}}
|
||||||
|
{{/model}}
|
||||||
|
{{/models}}
|
||||||
|
}
|
||||||
@@ -369,8 +369,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- test dependencies -->
|
<!-- test dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${junit-version}</version>
|
<version>${junit-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
<beanvalidation-version>2.0.2</beanvalidation-version>
|
<beanvalidation-version>2.0.2</beanvalidation-version>
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>5.8.2</junit-version>
|
||||||
<mockito-core-version>3.12.4</mockito-core-version>
|
<mockito-core-version>3.12.4</mockito-core-version>
|
||||||
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
||||||
<jsr311-api-version>1.1.1</jsr311-api-version>
|
<jsr311-api-version>1.1.1</jsr311-api-version>
|
||||||
|
|||||||
@@ -308,8 +308,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- test dependencies -->
|
<!-- test dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${junit-version}</version>
|
<version>${junit-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
<commons-lang3-version>3.12.0</commons-lang3-version>
|
<commons-lang3-version>3.12.0</commons-lang3-version>
|
||||||
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
||||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>5.8.2</junit-version>
|
||||||
<mockito-core-version>3.12.4</mockito-core-version>
|
<mockito-core-version>3.12.4</mockito-core-version>
|
||||||
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
||||||
<jsr311-api-version>1.1.1</jsr311-api-version>
|
<jsr311-api-version>1.1.1</jsr311-api-version>
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ package org.openapitools.client.api;
|
|||||||
|
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.SomeObj;
|
import org.openapitools.client.model.SomeObj;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -27,7 +27,7 @@ import java.io.InputStream;
|
|||||||
/**
|
/**
|
||||||
* API tests for PingApi
|
* API tests for PingApi
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class PingApiTest {
|
public class PingApiTest {
|
||||||
|
|
||||||
private final PingApi api = new PingApi();
|
private final PingApi api = new PingApi();
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -318,8 +318,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- test dependencies -->
|
<!-- test dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${junit-version}</version>
|
<version>${junit-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -341,7 +341,7 @@
|
|||||||
<commons-lang3-version>3.12.0</commons-lang3-version>
|
<commons-lang3-version>3.12.0</commons-lang3-version>
|
||||||
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
||||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>5.8.2</junit-version>
|
||||||
<mockito-core-version>3.12.4</mockito-core-version>
|
<mockito-core-version>3.12.4</mockito-core-version>
|
||||||
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
||||||
<jsr311-api-version>1.1.1</jsr311-api-version>
|
<jsr311-api-version>1.1.1</jsr311-api-version>
|
||||||
|
|||||||
@@ -10,10 +10,8 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.hamcrest.CoreMatchers.*;
|
|
||||||
|
|
||||||
|
|
||||||
public class ApiClientTest {
|
public class ApiClientTest {
|
||||||
ApiClient apiClient;
|
ApiClient apiClient;
|
||||||
@@ -338,7 +336,7 @@ public class ApiClientTest {
|
|||||||
public void testNewHttpClient() {
|
public void testNewHttpClient() {
|
||||||
OkHttpClient oldClient = apiClient.getHttpClient();
|
OkHttpClient oldClient = apiClient.getHttpClient();
|
||||||
apiClient.setHttpClient(oldClient.newBuilder().build());
|
apiClient.setHttpClient(oldClient.newBuilder().build());
|
||||||
assertThat(apiClient.getHttpClient(), is(not(oldClient)));
|
assertNotSame(apiClient.getHttpClient(), oldClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package org.openapitools.client;
|
package org.openapitools.client;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
|
||||||
public class ConfigurationTest {
|
public class ConfigurationTest {
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -16,14 +16,11 @@ import java.util.Locale;
|
|||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import okio.ByteString;
|
import okio.ByteString;
|
||||||
import org.junit.*;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import org.threeten.bp.ZoneId;
|
|
||||||
import org.threeten.bp.ZoneOffset;
|
|
||||||
import org.threeten.bp.format.DateTimeFormatter;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import org.junit.jupiter.api.*;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
public class JSONTest {
|
public class JSONTest {
|
||||||
private ApiClient apiClient = null;
|
private ApiClient apiClient = null;
|
||||||
@@ -199,4 +196,4 @@ public class JSONTest {
|
|||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package org.openapitools.client;
|
package org.openapitools.client;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
|
||||||
public class StringUtilTest {
|
public class StringUtilTest {
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -15,8 +15,8 @@ package org.openapitools.client.api;
|
|||||||
|
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.Client;
|
import org.openapitools.client.model.Client;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -26,26 +26,23 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API tests for AnotherFakeApi
|
* API tests for AnotherFakeApi
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class AnotherFakeApiTest {
|
public class AnotherFakeApiTest {
|
||||||
|
|
||||||
private final AnotherFakeApi api = new AnotherFakeApi();
|
private final AnotherFakeApi api = new AnotherFakeApi();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test special tags
|
* To test special tags
|
||||||
*
|
*
|
||||||
* To test special tags and operation ID starting with number
|
* To test special tags and operation ID starting with number
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void call123testSpecialTagsTest() throws ApiException {
|
public void call123testSpecialTagsTest() throws ApiException {
|
||||||
Client body = null;
|
Client body = null;
|
||||||
Client response = api.call123testSpecialTags(body);
|
Client response = api.call123testSpecialTags(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,8 +23,8 @@ import java.time.OffsetDateTime;
|
|||||||
import org.openapitools.client.model.OuterComposite;
|
import org.openapitools.client.model.OuterComposite;
|
||||||
import org.openapitools.client.model.User;
|
import org.openapitools.client.model.User;
|
||||||
import org.openapitools.client.model.XmlItem;
|
import org.openapitools.client.model.XmlItem;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -34,148 +34,116 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API tests for FakeApi
|
* API tests for FakeApi
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class FakeApiTest {
|
public class FakeApiTest {
|
||||||
|
|
||||||
private final FakeApi api = new FakeApi();
|
private final FakeApi api = new FakeApi();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates an XmlItem
|
* creates an XmlItem
|
||||||
*
|
*
|
||||||
* this route creates an XmlItem
|
* this route creates an XmlItem
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void createXmlItemTest() throws ApiException {
|
public void createXmlItemTest() throws ApiException {
|
||||||
XmlItem xmlItem = null;
|
XmlItem xmlItem = null;
|
||||||
api.createXmlItem(xmlItem);
|
api.createXmlItem(xmlItem);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* Test serialization of outer boolean types
|
* Test serialization of outer boolean types
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void fakeOuterBooleanSerializeTest() throws ApiException {
|
public void fakeOuterBooleanSerializeTest() throws ApiException {
|
||||||
Boolean body = null;
|
Boolean body = null;
|
||||||
Boolean response = api.fakeOuterBooleanSerialize(body);
|
Boolean response = api.fakeOuterBooleanSerialize(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* Test serialization of object with outer number type
|
* Test serialization of object with outer number type
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void fakeOuterCompositeSerializeTest() throws ApiException {
|
public void fakeOuterCompositeSerializeTest() throws ApiException {
|
||||||
OuterComposite body = null;
|
OuterComposite body = null;
|
||||||
OuterComposite response = api.fakeOuterCompositeSerialize(body);
|
OuterComposite response = api.fakeOuterCompositeSerialize(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* Test serialization of outer number types
|
* Test serialization of outer number types
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void fakeOuterNumberSerializeTest() throws ApiException {
|
public void fakeOuterNumberSerializeTest() throws ApiException {
|
||||||
BigDecimal body = null;
|
BigDecimal body = null;
|
||||||
BigDecimal response = api.fakeOuterNumberSerialize(body);
|
BigDecimal response = api.fakeOuterNumberSerialize(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* Test serialization of outer string types
|
* Test serialization of outer string types
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void fakeOuterStringSerializeTest() throws ApiException {
|
public void fakeOuterStringSerializeTest() throws ApiException {
|
||||||
String body = null;
|
String body = null;
|
||||||
String response = api.fakeOuterStringSerialize(body);
|
String response = api.fakeOuterStringSerialize(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* For this test, the body for this request much reference a schema named `File`.
|
* For this test, the body for this request much reference a schema named `File`.
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBodyWithFileSchemaTest() throws ApiException {
|
public void testBodyWithFileSchemaTest() throws ApiException {
|
||||||
FileSchemaTestClass body = null;
|
FileSchemaTestClass body = null;
|
||||||
api.testBodyWithFileSchema(body);
|
api.testBodyWithFileSchema(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBodyWithQueryParamsTest() throws ApiException {
|
public void testBodyWithQueryParamsTest() throws ApiException {
|
||||||
String query = null;
|
String query = null;
|
||||||
User body = null;
|
User body = null;
|
||||||
api.testBodyWithQueryParams(query, body);
|
api.testBodyWithQueryParams(query, body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
*
|
*
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testClientModelTest() throws ApiException {
|
public void testClientModelTest() throws ApiException {
|
||||||
Client body = null;
|
Client body = null;
|
||||||
Client response = api.testClientModel(body);
|
Client response = api.testClientModel(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testEndpointParametersTest() throws ApiException {
|
public void testEndpointParametersTest() throws ApiException {
|
||||||
@@ -194,17 +162,15 @@ public class FakeApiTest {
|
|||||||
String password = null;
|
String password = null;
|
||||||
String paramCallback = 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
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test enum parameters
|
* To test enum parameters
|
||||||
*
|
*
|
||||||
* To test enum parameters
|
* To test enum parameters
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testEnumParametersTest() throws ApiException {
|
public void testEnumParametersTest() throws ApiException {
|
||||||
@@ -217,17 +183,15 @@ public class FakeApiTest {
|
|||||||
List<String> enumFormStringArray = null;
|
List<String> enumFormStringArray = null;
|
||||||
String enumFormString = 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
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint to test group parameters (optional)
|
* Fake endpoint to test group parameters (optional)
|
||||||
*
|
*
|
||||||
* Fake endpoint to test group parameters (optional)
|
* Fake endpoint to test group parameters (optional)
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGroupParametersTest() throws ApiException {
|
public void testGroupParametersTest() throws ApiException {
|
||||||
@@ -242,41 +206,48 @@ public class FakeApiTest {
|
|||||||
.booleanGroup(booleanGroup)
|
.booleanGroup(booleanGroup)
|
||||||
.int64Group(int64Group)
|
.int64Group(int64Group)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test inline additionalProperties
|
* test inline additionalProperties
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testInlineAdditionalPropertiesTest() throws ApiException {
|
public void testInlineAdditionalPropertiesTest() throws ApiException {
|
||||||
Map<String, String> param = null;
|
Map<String, String> param = null;
|
||||||
api.testInlineAdditionalProperties(param);
|
api.testInlineAdditionalProperties(param);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test json serialization of form data
|
* test json serialization of form data
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testJsonFormDataTest() throws ApiException {
|
public void testJsonFormDataTest() throws ApiException {
|
||||||
String param = null;
|
String param = null;
|
||||||
String param2 = null;
|
String param2 = null;
|
||||||
api.testJsonFormData(param, param2);
|
api.testJsonFormData(param, param2);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To test the collection format in query parameters
|
||||||
|
*
|
||||||
|
* @throws ApiException if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testQueryParameterCollectionFormatTest() throws ApiException {
|
||||||
|
List<String> pipe = null;
|
||||||
|
List<String> ioutil = null;
|
||||||
|
List<String> http = null;
|
||||||
|
List<String> url = null;
|
||||||
|
List<String> context = null;
|
||||||
|
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -15,8 +15,8 @@ package org.openapitools.client.api;
|
|||||||
|
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.Client;
|
import org.openapitools.client.model.Client;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -26,26 +26,23 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API tests for FakeClassnameTags123Api
|
* API tests for FakeClassnameTags123Api
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class FakeClassnameTags123ApiTest {
|
public class FakeClassnameTags123ApiTest {
|
||||||
|
|
||||||
private final FakeClassnameTags123Api api = new FakeClassnameTags123Api();
|
private final FakeClassnameTags123Api api = new FakeClassnameTags123Api();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test class name in snake case
|
* To test class name in snake case
|
||||||
*
|
*
|
||||||
* To test class name in snake case
|
* To test class name in snake case
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testClassnameTest() throws ApiException {
|
public void testClassnameTest() throws ApiException {
|
||||||
Client body = null;
|
Client body = null;
|
||||||
Client response = api.testClassname(body);
|
Client response = api.testClassname(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ import java.io.FileWriter;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API tests for PetApi
|
* API tests for PetApi
|
||||||
@@ -312,14 +311,14 @@ public class PetApiTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Disabled
|
||||||
public void testFindPetsByTags() throws Exception {
|
public void testFindPetsByTags() throws Exception {
|
||||||
Pet pet = createPet();
|
Pet pet = createPet();
|
||||||
pet.setName("monster");
|
pet.setName("monster");
|
||||||
pet.setStatus(Pet.StatusEnum.AVAILABLE);
|
pet.setStatus(Pet.StatusEnum.AVAILABLE);
|
||||||
|
|
||||||
List<Tag> tags = new ArrayList<Tag>();
|
List<org.openapitools.client.model.Tag> tags = new ArrayList<org.openapitools.client.model.Tag>();
|
||||||
Tag tag1 = new Tag();
|
org.openapitools.client.model.Tag tag1 = new org.openapitools.client.model.Tag();
|
||||||
tag1.setName("friendly");
|
tag1.setName("friendly");
|
||||||
tags.add(tag1);
|
tags.add(tag1);
|
||||||
pet.setTags(tags);
|
pet.setTags(tags);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -15,8 +15,8 @@ package org.openapitools.client.api;
|
|||||||
|
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.Order;
|
import org.openapitools.client.model.Order;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -26,73 +26,62 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API tests for StoreApi
|
* API tests for StoreApi
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class StoreApiTest {
|
public class StoreApiTest {
|
||||||
|
|
||||||
private final StoreApi api = new StoreApi();
|
private final StoreApi api = new StoreApi();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
*
|
*
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void deleteOrderTest() throws ApiException {
|
public void deleteOrderTest() throws ApiException {
|
||||||
String orderId = null;
|
String orderId = null;
|
||||||
api.deleteOrder(orderId);
|
api.deleteOrder(orderId);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
*
|
*
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void getInventoryTest() throws ApiException {
|
public void getInventoryTest() throws ApiException {
|
||||||
Map<String, Integer> response = api.getInventory();
|
Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
*
|
*
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void getOrderByIdTest() throws ApiException {
|
public void getOrderByIdTest() throws ApiException {
|
||||||
Long orderId = null;
|
Long orderId = null;
|
||||||
Order response = api.getOrderById(orderId);
|
Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void placeOrderTest() throws ApiException {
|
public void placeOrderTest() throws ApiException {
|
||||||
Order body = null;
|
Order body = null;
|
||||||
Order response = api.placeOrder(body);
|
Order response = api.placeOrder(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -14,9 +14,10 @@
|
|||||||
package org.openapitools.client.api;
|
package org.openapitools.client.api;
|
||||||
|
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
import org.openapitools.client.model.User;
|
import org.openapitools.client.model.User;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -26,139 +27,112 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API tests for UserApi
|
* API tests for UserApi
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class UserApiTest {
|
public class UserApiTest {
|
||||||
|
|
||||||
private final UserApi api = new UserApi();
|
private final UserApi api = new UserApi();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
*
|
*
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void createUserTest() throws ApiException {
|
public void createUserTest() throws ApiException {
|
||||||
User body = null;
|
User body = null;
|
||||||
api.createUser(body);
|
api.createUser(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void createUsersWithArrayInputTest() throws ApiException {
|
public void createUsersWithArrayInputTest() throws ApiException {
|
||||||
List<User> body = null;
|
List<User> body = null;
|
||||||
api.createUsersWithArrayInput(body);
|
api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void createUsersWithListInputTest() throws ApiException {
|
public void createUsersWithListInputTest() throws ApiException {
|
||||||
List<User> body = null;
|
List<User> body = null;
|
||||||
api.createUsersWithListInput(body);
|
api.createUsersWithListInput(body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
*
|
*
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void deleteUserTest() throws ApiException {
|
public void deleteUserTest() throws ApiException {
|
||||||
String username = null;
|
String username = null;
|
||||||
api.deleteUser(username);
|
api.deleteUser(username);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void getUserByNameTest() throws ApiException {
|
public void getUserByNameTest() throws ApiException {
|
||||||
String username = null;
|
String username = null;
|
||||||
User response = api.getUserByName(username);
|
User response = api.getUserByName(username);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void loginUserTest() throws ApiException {
|
public void loginUserTest() throws ApiException {
|
||||||
String username = null;
|
String username = null;
|
||||||
String password = null;
|
String password = null;
|
||||||
String response = api.loginUser(username, password);
|
String response = api.loginUser(username, password);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
*
|
*
|
||||||
*
|
* @throws ApiException if the Api call fails
|
||||||
*
|
|
||||||
* @throws ApiException
|
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void logoutUserTest() throws ApiException {
|
public void logoutUserTest() throws ApiException {
|
||||||
api.logoutUser();
|
api.logoutUser();
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
*
|
*
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
*
|
*
|
||||||
* @throws ApiException
|
* @throws ApiException if the Api call fails
|
||||||
* if the Api call fails
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void updateUserTest() throws ApiException {
|
public void updateUserTest() throws ApiException {
|
||||||
String username = null;
|
String username = null;
|
||||||
User body = null;
|
User body = null;
|
||||||
api.updateUser(username, body);
|
api.updateUser(username, body);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import java.util.Map;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.openapitools.client.Pair;
|
import org.openapitools.client.Pair;
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
public class ApiKeyAuthTest {
|
public class ApiKeyAuthTest {
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import java.util.Map;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.openapitools.client.Pair;
|
import org.openapitools.client.Pair;
|
||||||
import org.junit.*;
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.*;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
public class HttpBasicAuthTest {
|
public class HttpBasicAuthTest {
|
||||||
HttpBasicAuth auth = null;
|
HttpBasicAuth auth = null;
|
||||||
|
|
||||||
@Before
|
@BeforeEach
|
||||||
public void setup() {
|
public void setup() {
|
||||||
auth = new HttpBasicAuth();
|
auth = new HttpBasicAuth();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,12 +21,12 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,19 +44,91 @@ public class AdditionalPropertiesClassTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the property 'mapProperty'
|
* Test the property 'mapString'
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void mapPropertyTest() {
|
public void mapStringTest() {
|
||||||
// TODO: test mapProperty
|
// TODO: test mapString
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the property 'mapOfMapProperty'
|
* Test the property 'mapNumber'
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void mapOfMapPropertyTest() {
|
public void mapNumberTest() {
|
||||||
// TODO: test mapOfMapProperty
|
// TODO: test mapNumber
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'mapInteger'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void mapIntegerTest() {
|
||||||
|
// TODO: test mapInteger
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'mapBoolean'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void mapBooleanTest() {
|
||||||
|
// TODO: test mapBoolean
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'mapArrayInteger'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void mapArrayIntegerTest() {
|
||||||
|
// TODO: test mapArrayInteger
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'mapArrayAnytype'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void mapArrayAnytypeTest() {
|
||||||
|
// TODO: test mapArrayAnytype
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'mapMapString'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void mapMapStringTest() {
|
||||||
|
// TODO: test mapMapString
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'mapMapAnytype'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void mapMapAnytypeTest() {
|
||||||
|
// TODO: test mapMapAnytype
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'anytype1'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void anytype1Test() {
|
||||||
|
// TODO: test anytype1
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'anytype2'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void anytype2Test() {
|
||||||
|
// TODO: test anytype2
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'anytype3'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void anytype3Test() {
|
||||||
|
// TODO: test anytype3
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,11 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.openapitools.client.model.BigCat;
|
||||||
import org.junit.Ignore;
|
import org.openapitools.client.model.Cat;
|
||||||
import org.junit.Test;
|
import org.openapitools.client.model.Dog;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Assertions.*;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model tests for ArrayOfArrayOfNumberOnly
|
* Model tests for ArrayOfArrayOfNumberOnly
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.openapitools.client.model.ReadOnlyFirst;
|
import org.openapitools.client.model.ReadOnlyFirst;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.openapitools.client.model.BigCatAllOf;
|
import org.openapitools.client.model.BigCatAllOf;
|
||||||
import org.openapitools.client.model.Cat;
|
import org.openapitools.client.model.Cat;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -22,9 +22,10 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.openapitools.client.model.Animal;
|
import org.openapitools.client.model.Animal;
|
||||||
import org.junit.Assert;
|
import org.openapitools.client.model.BigCat;
|
||||||
import org.junit.Ignore;
|
import org.openapitools.client.model.CatAllOf;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.openapitools.client.model.Animal;
|
import org.openapitools.client.model.Animal;
|
||||||
import org.junit.Assert;
|
import org.openapitools.client.model.DogAllOf;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -14,9 +14,8 @@
|
|||||||
package org.openapitools.client.model;
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.openapitools.client.model.OuterEnum;
|
import org.openapitools.client.model.OuterEnum;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
public class EnumValueTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testEnumClass() {
|
|
||||||
assertEquals(EnumClass._ABC.toString(), "_abc");
|
|
||||||
assertEquals(EnumClass._EFG.toString(), "-efg");
|
|
||||||
assertEquals(EnumClass._XYZ_.toString(), "(xyz)");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testEnumTest() {
|
|
||||||
// test enum value
|
|
||||||
EnumTest enumTest = new EnumTest();
|
|
||||||
enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER);
|
|
||||||
enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1);
|
|
||||||
enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1);
|
|
||||||
|
|
||||||
assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER");
|
|
||||||
assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER");
|
|
||||||
assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower");
|
|
||||||
assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower");
|
|
||||||
|
|
||||||
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1");
|
|
||||||
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1);
|
|
||||||
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1");
|
|
||||||
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1);
|
|
||||||
|
|
||||||
assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1");
|
|
||||||
assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1);
|
|
||||||
assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2");
|
|
||||||
assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2);
|
|
||||||
|
|
||||||
// test serialization
|
|
||||||
Gson gson = new Gson();
|
|
||||||
String json = gson.toJson(enumTest);
|
|
||||||
assertEquals(json, "{\"enum_string\":\"lower\",\"enum_integer\":1,\"enum_number\":1.1}");
|
|
||||||
|
|
||||||
// test deserialization
|
|
||||||
EnumTest fromString = gson.fromJson(json, EnumTest.class);
|
|
||||||
assertEquals(fromString.getEnumString().toString(), "lower");
|
|
||||||
assertEquals(fromString.getEnumString().getValue(), "lower");
|
|
||||||
assertEquals(fromString.getEnumInteger().toString(), "1");
|
|
||||||
assertTrue(fromString.getEnumInteger().getValue() == 1);
|
|
||||||
assertEquals(fromString.getEnumNumber().toString(), "1.1");
|
|
||||||
assertTrue(fromString.getEnumNumber().getValue() == 1.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,9 +23,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
import org.openapitools.client.model.ModelFile;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,11 +43,11 @@ public class FileSchemaTestClassTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the property 'file'
|
* Test the property '_file'
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void fileTest() {
|
public void _fileTest() {
|
||||||
// TODO: test file
|
// TODO: test _file
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -23,12 +23,11 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.UUID;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import org.junit.Assert;
|
import java.util.UUID;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -149,4 +148,12 @@ public class FormatTestTest {
|
|||||||
// TODO: test password
|
// TODO: test password
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'bigDecimal'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void bigDecimalTest() {
|
||||||
|
// TODO: test bigDecimal
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,15 +21,14 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.openapitools.client.model.Animal;
|
import org.openapitools.client.model.Animal;
|
||||||
import java.time.OffsetDateTime;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -22,9 +22,8 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -14,9 +14,8 @@
|
|||||||
package org.openapitools.client.model;
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -22,12 +22,13 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import org.openapitools.client.model.Category;
|
import org.openapitools.client.model.Category;
|
||||||
import org.openapitools.client.model.Tag;
|
import org.openapitools.client.model.Tag;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,15 +42,7 @@ public class PetTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPet() {
|
public void testPet() {
|
||||||
// test Pet
|
// TODO: test Pet
|
||||||
model.setId(1029L);
|
|
||||||
model.setName("Dog");
|
|
||||||
|
|
||||||
Pet model2 = new Pet();
|
|
||||||
model2.setId(1029L);
|
|
||||||
model2.setName("Dog");
|
|
||||||
|
|
||||||
Assert.assertTrue(model.equals(model2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,6 +58,14 @@ public class TypeHolderExampleTest {
|
|||||||
// TODO: test numberItem
|
// TODO: test numberItem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'floatItem'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void floatItemTest() {
|
||||||
|
// TODO: test floatItem
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the property 'integerItem'
|
* Test the property 'integerItem'
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -21,9 +21,8 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* 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
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
@@ -24,9 +24,8 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -320,8 +320,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- test dependencies -->
|
<!-- test dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${junit-version}</version>
|
<version>${junit-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -343,7 +343,7 @@
|
|||||||
<commons-lang3-version>3.12.0</commons-lang3-version>
|
<commons-lang3-version>3.12.0</commons-lang3-version>
|
||||||
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
||||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>5.8.2</junit-version>
|
||||||
<mockito-core-version>3.12.4</mockito-core-version>
|
<mockito-core-version>3.12.4</mockito-core-version>
|
||||||
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
||||||
<jsr311-api-version>1.1.1</jsr311-api-version>
|
<jsr311-api-version>1.1.1</jsr311-api-version>
|
||||||
|
|||||||
@@ -313,8 +313,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- test dependencies -->
|
<!-- test dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${junit-version}</version>
|
<version>${junit-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
<commons-lang3-version>3.12.0</commons-lang3-version>
|
<commons-lang3-version>3.12.0</commons-lang3-version>
|
||||||
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
||||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>5.8.2</junit-version>
|
||||||
<mockito-core-version>3.12.4</mockito-core-version>
|
<mockito-core-version>3.12.4</mockito-core-version>
|
||||||
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
||||||
<jsr311-api-version>1.1.1</jsr311-api-version>
|
<jsr311-api-version>1.1.1</jsr311-api-version>
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
package org.openapitools.client;
|
package org.openapitools.client;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
|
|
||||||
public class ApiClientTest {
|
public class ApiClientTest {
|
||||||
ApiClient apiClient;
|
ApiClient apiClient;
|
||||||
JSON json;
|
JSON json;
|
||||||
|
|
||||||
@Before
|
@BeforeEach
|
||||||
public void setup() {
|
public void setup() {
|
||||||
apiClient = new ApiClient();
|
apiClient = new ApiClient();
|
||||||
json = apiClient.getJSON();
|
json = apiClient.getJSON();
|
||||||
@@ -49,16 +49,16 @@ public class ApiClientTest {
|
|||||||
String[] accepts = {"application/json", "application/xml"};
|
String[] accepts = {"application/json", "application/xml"};
|
||||||
assertEquals("application/json", apiClient.selectHeaderAccept(accepts));
|
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));
|
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));
|
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));
|
assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
accepts = new String[] {};
|
accepts = new String[]{};
|
||||||
assertNull(apiClient.selectHeaderAccept(accepts));
|
assertNull(apiClient.selectHeaderAccept(accepts));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,17 +67,17 @@ public class ApiClientTest {
|
|||||||
String[] contentTypes = {"application/json", "application/xml"};
|
String[] contentTypes = {"application/json", "application/xml"};
|
||||||
assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes));
|
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));
|
assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
contentTypes = new String[] {"application/xml", "application/json; charset=UTF8"};
|
contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes));
|
"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));
|
assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
contentTypes = new String[] {};
|
contentTypes = new String[]{};
|
||||||
assertNull(apiClient.selectHeaderContentType(contentTypes));
|
assertNull(apiClient.selectHeaderContentType(contentTypes));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,12 +334,17 @@ public class ApiClientTest {
|
|||||||
public void testNewHttpClient() {
|
public void testNewHttpClient() {
|
||||||
OkHttpClient oldClient = apiClient.getHttpClient();
|
OkHttpClient oldClient = apiClient.getHttpClient();
|
||||||
apiClient.setHttpClient(oldClient.newBuilder().build());
|
apiClient.setHttpClient(oldClient.newBuilder().build());
|
||||||
assertThat(apiClient.getHttpClient(), is(not(oldClient)));
|
assertNotSame(apiClient.getHttpClient(), oldClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tests the invariant that the HttpClient for the ApiClient must never be null */
|
/**
|
||||||
@Test(expected = NullPointerException.class)
|
* Tests the invariant that the HttpClient for the ApiClient must never be null
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
public void testNullHttpClient() {
|
public void testNullHttpClient() {
|
||||||
apiClient.setHttpClient(null);
|
NullPointerException thrown = Assertions.assertThrows(NullPointerException.class, () -> {
|
||||||
|
apiClient.setHttpClient(null);
|
||||||
|
});
|
||||||
|
Assertions.assertEquals("HttpClient must not be null!", thrown.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.openapitools.client;
|
package org.openapitools.client;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
|
|
||||||
public class ConfigurationTest {
|
public class ConfigurationTest {
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package org.openapitools.client;
|
package org.openapitools.client;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -20,8 +21,9 @@ import java.util.Date;
|
|||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import okio.ByteString;
|
import okio.ByteString;
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.openapitools.client.model.Order;
|
import org.openapitools.client.model.Order;
|
||||||
|
|
||||||
import org.openapitools.client.model.*;
|
import org.openapitools.client.model.*;
|
||||||
@@ -31,7 +33,7 @@ public class JSONTest {
|
|||||||
private JSON json = null;
|
private JSON json = null;
|
||||||
private Order order = null;
|
private Order order = null;
|
||||||
|
|
||||||
@Before
|
@BeforeEach
|
||||||
public void setup() {
|
public void setup() {
|
||||||
apiClient = new ApiClient();
|
apiClient = new ApiClient();
|
||||||
json = apiClient.getJSON();
|
json = apiClient.getJSON();
|
||||||
@@ -145,7 +147,8 @@ public class JSONTest {
|
|||||||
order.setShipDate(OffsetDateTime.from(datetimeFormat.parse(dateStr)));
|
order.setShipDate(OffsetDateTime.from(datetimeFormat.parse(dateStr)));
|
||||||
|
|
||||||
String str = json.serialize(order);
|
String str = json.serialize(order);
|
||||||
Type type = new TypeToken<Order>() {}.getType();
|
Type type = new TypeToken<Order>() {
|
||||||
|
}.getType();
|
||||||
Order o = json.deserialize(str, type);
|
Order o = json.deserialize(str, type);
|
||||||
assertEquals(dateStr, datetimeFormat.format(o.getShipDate()));
|
assertEquals(dateStr, datetimeFormat.format(o.getShipDate()));
|
||||||
}
|
}
|
||||||
@@ -158,7 +161,8 @@ public class JSONTest {
|
|||||||
order.setShipDate(OffsetDateTime.from(datetimeFormat.parse(dateStr)));
|
order.setShipDate(OffsetDateTime.from(datetimeFormat.parse(dateStr)));
|
||||||
|
|
||||||
String str = json.serialize(order);
|
String str = json.serialize(order);
|
||||||
Type type = new TypeToken<Order>() {}.getType();
|
Type type = new TypeToken<Order>() {
|
||||||
|
}.getType();
|
||||||
Order o = json.deserialize(str, type);
|
Order o = json.deserialize(str, type);
|
||||||
assertEquals(dateStr, datetimeFormat.format(o.getShipDate()));
|
assertEquals(dateStr, datetimeFormat.format(o.getShipDate()));
|
||||||
}
|
}
|
||||||
@@ -191,7 +195,8 @@ public class JSONTest {
|
|||||||
final ByteString expectedByteString = ByteString.of(expectedBytes);
|
final ByteString expectedByteString = ByteString.of(expectedBytes);
|
||||||
final String serializedBytes = expectedByteString.base64();
|
final String serializedBytes = expectedByteString.base64();
|
||||||
final String serializedBytesWithQuotes = "\"" + serializedBytes + "\"";
|
final String serializedBytesWithQuotes = "\"" + serializedBytes + "\"";
|
||||||
Type type = new TypeToken<byte[]>() {}.getType();
|
Type type = new TypeToken<byte[]>() {
|
||||||
|
}.getType();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
byte[] actualDeserializedBytes = json.deserialize(serializedBytesWithQuotes, type);
|
byte[] actualDeserializedBytes = json.deserialize(serializedBytesWithQuotes, type);
|
||||||
@@ -201,28 +206,36 @@ public class JSONTest {
|
|||||||
expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8));
|
expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test
|
||||||
public void testRequiredFieldException() {
|
public void testRequiredFieldException() {
|
||||||
// test json string missing required field(s) to ensure exception is thrown
|
IllegalArgumentException thrown = Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||||
Gson gson = json.getGson();
|
// test json string missing required field(s) to ensure exception is thrown
|
||||||
//Gson gson = new GsonBuilder()
|
Gson gson = json.getGson();
|
||||||
// .registerTypeAdapter(Pet.class, new Pet.CustomDeserializer())
|
//Gson gson = new GsonBuilder()
|
||||||
// .create();
|
// .registerTypeAdapter(Pet.class, new Pet.CustomDeserializer())
|
||||||
String json = "{\"id\": 5847, \"name\":\"tag test 1\"}"; // missing photoUrls (required field)
|
// .create();
|
||||||
//String json = "{\"id2\": 5847, \"name\":\"tag test 1\"}";
|
String json = "{\"id\": 5847, \"name\":\"tag test 1\"}"; // missing photoUrls (required field)
|
||||||
//String json = "{\"id\": 5847}";
|
//String json = "{\"id2\": 5847, \"name\":\"tag test 1\"}";
|
||||||
Pet p = gson.fromJson(json, Pet.class);
|
//String json = "{\"id\": 5847}";
|
||||||
|
Pet p = gson.fromJson(json, Pet.class);
|
||||||
|
});
|
||||||
|
|
||||||
|
Assertions.assertEquals("The required field `photoUrls` is not found in the JSON string: {\"id\":5847,\"name\":\"tag test 1\"}", thrown.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test
|
||||||
public void testAdditionalFieldException() {
|
public void testAdditionalFieldException() {
|
||||||
// test json string with additional field(s) to ensure exception is thrown
|
IllegalArgumentException thrown = Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||||
Gson gson = json.getGson();
|
// test json string with additional field(s) to ensure exception is thrown
|
||||||
//Gson gson = new GsonBuilder()
|
Gson gson = json.getGson();
|
||||||
// .registerTypeAdapter(Tag.class, new Tag.CustomDeserializer())
|
//Gson gson = new GsonBuilder()
|
||||||
// .create();
|
// .registerTypeAdapter(Tag.class, new Tag.CustomDeserializer())
|
||||||
String json = "{\"id\": 5847, \"name\":\"tag test 1\", \"new-field\": true}";
|
// .create();
|
||||||
Tag t = gson.fromJson(json, Tag.class);
|
String json = "{\"id\": 5847, \"name\":\"tag test 1\", \"new-field\": true}";
|
||||||
|
org.openapitools.client.model.Tag t = gson.fromJson(json, org.openapitools.client.model.Tag.class);
|
||||||
|
});
|
||||||
|
|
||||||
|
Assertions.assertEquals("The field `new-field` in the JSON string is not defined in the `Tag` properties. JSON: {\"id\":5847,\"name\":\"tag test 1\",\"new-field\":true}", thrown.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -234,22 +247,22 @@ public class JSONTest {
|
|||||||
// .create();
|
// .create();
|
||||||
// id and name
|
// id and name
|
||||||
String json = "{\"id\": 5847, \"name\":\"tag test 1\"}";
|
String json = "{\"id\": 5847, \"name\":\"tag test 1\"}";
|
||||||
Tag t = gson.fromJson(json, Tag.class);
|
org.openapitools.client.model.Tag t = gson.fromJson(json, org.openapitools.client.model.Tag.class);
|
||||||
assertEquals(t.getName(), "tag test 1");
|
assertEquals(t.getName(), "tag test 1");
|
||||||
assertEquals(t.getId(), Long.valueOf(5847L));
|
assertEquals(t.getId(), Long.valueOf(5847L));
|
||||||
|
|
||||||
// name only
|
// name only
|
||||||
String json2 = "{\"name\":\"tag test 1\"}";
|
String json2 = "{\"name\":\"tag test 1\"}";
|
||||||
Tag t2 = gson.fromJson(json2, Tag.class);
|
org.openapitools.client.model.Tag t2 = gson.fromJson(json2, org.openapitools.client.model.Tag.class);
|
||||||
assertEquals(t2.getName(), "tag test 1");
|
assertEquals(t2.getName(), "tag test 1");
|
||||||
assertEquals(t2.getId(), null);
|
assertEquals(t2.getId(), null);
|
||||||
|
|
||||||
// with all required fields
|
// with all required fields
|
||||||
String json3 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"]}";
|
String json3 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"]}";
|
||||||
Pet t3 = gson.fromJson(json3, Pet.class);
|
Pet t3 = gson.fromJson(json3, Pet.class);
|
||||||
assertEquals(t3.getName(), "pet test 1");
|
assertEquals(t3.getName(), "pet test 1");
|
||||||
assertEquals(t3.getId(), Long.valueOf(5847));
|
assertEquals(t3.getId(), Long.valueOf(5847));
|
||||||
|
|
||||||
// with all required fields and tags (optional)
|
// with all required fields and tags (optional)
|
||||||
String json4 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"id\":\"tag 123\"}]}";
|
String json4 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"id\":\"tag 123\"}]}";
|
||||||
Pet t4 = gson.fromJson(json3, Pet.class);
|
Pet t4 = gson.fromJson(json3, Pet.class);
|
||||||
@@ -259,35 +272,35 @@ public class JSONTest {
|
|||||||
// test Tag
|
// test Tag
|
||||||
String json5 = "{\"unknown_field\": 543, \"id\":\"tag 123\"}";
|
String json5 = "{\"unknown_field\": 543, \"id\":\"tag 123\"}";
|
||||||
Exception exception5 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
Exception exception5 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
||||||
Tag t5 = gson.fromJson(json5, Tag.class);
|
org.openapitools.client.model.Tag t5 = gson.fromJson(json5, org.openapitools.client.model.Tag.class);
|
||||||
});
|
});
|
||||||
assertTrue(exception5.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}"));
|
assertTrue(exception5.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}"));
|
||||||
|
|
||||||
// test Pet with invalid tags
|
// test Pet with invalid tags
|
||||||
String json6 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"unknown_field\": 543, \"id\":\"tag 123\"}]}";
|
String json6 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"unknown_field\": 543, \"id\":\"tag 123\"}]}";
|
||||||
Exception exception6 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
Exception exception6 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
||||||
Pet t6 = gson.fromJson(json6, Pet.class);
|
Pet t6 = gson.fromJson(json6, Pet.class);
|
||||||
});
|
});
|
||||||
assertTrue(exception6.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}"));
|
assertTrue(exception6.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}"));
|
||||||
|
|
||||||
// test Pet with invalid tags (required)
|
// test Pet with invalid tags (required)
|
||||||
String json7 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"unknown_field\": 543, \"id\":\"tag 123\"}]}";
|
String json7 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"],\"tags\":[{\"unknown_field\": 543, \"id\":\"tag 123\"}]}";
|
||||||
Exception exception7 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
Exception exception7 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
||||||
PetWithRequiredTags t7 = gson.fromJson(json7, PetWithRequiredTags.class);
|
PetWithRequiredTags t7 = gson.fromJson(json7, PetWithRequiredTags.class);
|
||||||
});
|
});
|
||||||
assertTrue(exception7.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}"));
|
assertTrue(exception7.getMessage().contains("The field `unknown_field` in the JSON string is not defined in the `Tag` properties. JSON: {\"unknown_field\":543,\"id\":\"tag 123\"}"));
|
||||||
|
|
||||||
// test Pet with invalid tags (missing reqired)
|
// test Pet with invalid tags (missing reqired)
|
||||||
String json8 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"]}";
|
String json8 = "{\"id\": 5847, \"name\":\"pet test 1\", \"photoUrls\": [\"https://a.com\", \"https://b.com\"]}";
|
||||||
Exception exception8 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
Exception exception8 = assertThrows(java.lang.IllegalArgumentException.class, () -> {
|
||||||
PetWithRequiredTags t8 = gson.fromJson(json8, PetWithRequiredTags.class);
|
PetWithRequiredTags t8 = gson.fromJson(json8, PetWithRequiredTags.class);
|
||||||
});
|
});
|
||||||
assertTrue(exception8.getMessage().contains("The required field `tags` is not found in the JSON string: {\"id\":5847,\"name\":\"pet test 1\",\"photoUrls\":[\"https://a.com\",\"https://b.com\"]}"));
|
assertTrue(exception8.getMessage().contains("The required field `tags` is not found in the JSON string: {\"id\":5847,\"name\":\"pet test 1\",\"photoUrls\":[\"https://a.com\",\"https://b.com\"]}"));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Model tests for Pet */
|
/**
|
||||||
|
* Model tests for Pet
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPet() {
|
public void testPet() {
|
||||||
// test Pet
|
// test Pet
|
||||||
@@ -299,7 +312,7 @@ public class JSONTest {
|
|||||||
model2.setId(1029L);
|
model2.setId(1029L);
|
||||||
model2.setName("Dog");
|
model2.setName("Dog");
|
||||||
|
|
||||||
Assert.assertTrue(model.equals(model2));
|
assertTrue(model.equals(model2));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtained 22JAN2018 from stackoverflow answer by PuguaSoft
|
// Obtained 22JAN2018 from stackoverflow answer by PuguaSoft
|
||||||
@@ -366,7 +379,7 @@ public class JSONTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate a oneOf schema can be deserialized into the expected class.
|
* Validate a oneOf schema can be deserialized into the expected class.
|
||||||
* The oneOf schema has a discriminator.
|
* The oneOf schema has a discriminator.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOneOfSchemaWithDiscriminator() throws Exception {
|
public void testOneOfSchemaWithDiscriminator() throws Exception {
|
||||||
@@ -425,7 +438,7 @@ public class JSONTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate a oneOf schema can be deserialized into the expected class.
|
* Validate a oneOf schema can be deserialized into the expected class.
|
||||||
* The oneOf schema does not have a discriminator.
|
* The oneOf schema does not have a discriminator.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOneOfSchemaWithoutDiscriminator() throws Exception {
|
public void testOneOfSchemaWithoutDiscriminator() throws Exception {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.openapitools.client;
|
package org.openapitools.client;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
|
|
||||||
public class StringUtilTest {
|
public class StringUtilTest {
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
package org.openapitools.client.api;
|
package org.openapitools.client.api;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.Client;
|
import org.openapitools.client.model.Client;
|
||||||
|
|
||||||
/** API tests for AnotherFakeApi */
|
/** API tests for AnotherFakeApi */
|
||||||
@Ignore
|
@Disabled
|
||||||
public class AnotherFakeApiTest {
|
public class AnotherFakeApiTest {
|
||||||
|
|
||||||
private final AnotherFakeApi api = new AnotherFakeApi();
|
private final AnotherFakeApi api = new AnotherFakeApi();
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ package org.openapitools.client.api;
|
|||||||
|
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.InlineResponseDefault;
|
import org.openapitools.client.model.InlineResponseDefault;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -26,7 +26,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API tests for DefaultApi
|
* API tests for DefaultApi
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class DefaultApiTest {
|
public class DefaultApiTest {
|
||||||
|
|
||||||
private final DefaultApi api = new DefaultApi();
|
private final DefaultApi api = new DefaultApi();
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ import java.time.OffsetDateTime;
|
|||||||
import org.openapitools.client.model.OuterComposite;
|
import org.openapitools.client.model.OuterComposite;
|
||||||
import org.openapitools.client.model.OuterEnum;
|
import org.openapitools.client.model.OuterEnum;
|
||||||
import org.openapitools.client.model.User;
|
import org.openapitools.client.model.User;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -35,7 +35,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API tests for FakeApi
|
* API tests for FakeApi
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Disabled
|
||||||
public class FakeApiTest {
|
public class FakeApiTest {
|
||||||
|
|
||||||
private final FakeApi api = new FakeApi();
|
private final FakeApi api = new FakeApi();
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
package org.openapitools.client.api;
|
package org.openapitools.client.api;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.Client;
|
import org.openapitools.client.model.Client;
|
||||||
|
|
||||||
/** API tests for FakeClassnameTags123Api */
|
/** API tests for FakeClassnameTags123Api */
|
||||||
@Ignore
|
@Disabled
|
||||||
public class FakeClassnameTags123ApiTest {
|
public class FakeClassnameTags123ApiTest {
|
||||||
|
|
||||||
private final FakeClassnameTags123Api api = new FakeClassnameTags123Api();
|
private final FakeClassnameTags123Api api = new FakeClassnameTags123Api();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
package org.openapitools.client.api;
|
package org.openapitools.client.api;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -29,7 +29,8 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
|||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.junit.*;
|
|
||||||
|
import org.junit.jupiter.api.*;
|
||||||
import org.openapitools.client.*;
|
import org.openapitools.client.*;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.auth.*;
|
import org.openapitools.client.auth.*;
|
||||||
@@ -38,7 +39,9 @@ import org.openapitools.client.model.Pet;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/** API tests for PetApi */
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
public class PetApiTest {
|
public class PetApiTest {
|
||||||
|
|
||||||
private PetApi api = new PetApi();
|
private PetApi api = new PetApi();
|
||||||
@@ -47,7 +50,7 @@ public class PetApiTest {
|
|||||||
// to 127.0.0.1
|
// to 127.0.0.1
|
||||||
private static String basePath = "http://petstore.swagger.io:80/v2";
|
private static String basePath = "http://petstore.swagger.io:80/v2";
|
||||||
|
|
||||||
@Before
|
@BeforeEach
|
||||||
public void setup() {
|
public void setup() {
|
||||||
// setup authentication
|
// setup authentication
|
||||||
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key");
|
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key");
|
||||||
@@ -323,14 +326,14 @@ public class PetApiTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Disabled
|
||||||
public void testFindPetsByTags() throws Exception {
|
public void testFindPetsByTags() throws Exception {
|
||||||
Pet pet = createPet();
|
Pet pet = createPet();
|
||||||
pet.setName("monster");
|
pet.setName("monster");
|
||||||
pet.setStatus(Pet.StatusEnum.AVAILABLE);
|
pet.setStatus(Pet.StatusEnum.AVAILABLE);
|
||||||
|
|
||||||
List<Tag> tags = new ArrayList<Tag>();
|
List<org.openapitools.client.model.Tag> tags = new ArrayList<org.openapitools.client.model.Tag>();
|
||||||
Tag tag1 = new Tag();
|
org.openapitools.client.model.Tag tag1 = new org.openapitools.client.model.Tag();
|
||||||
tag1.setName("friendly");
|
tag1.setName("friendly");
|
||||||
tags.add(tag1);
|
tags.add(tag1);
|
||||||
pet.setTags(tags);
|
pet.setTags(tags);
|
||||||
@@ -368,7 +371,7 @@ public class PetApiTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Disabled
|
||||||
public void testDeletePet() throws Exception {
|
public void testDeletePet() throws Exception {
|
||||||
Pet pet = createPet();
|
Pet pet = createPet();
|
||||||
api.addPet(pet);
|
api.addPet(pet);
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ package org.openapitools.client.api;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.Order;
|
import org.openapitools.client.model.Order;
|
||||||
|
|
||||||
/** API tests for StoreApi */
|
/** API tests for StoreApi */
|
||||||
@Ignore
|
@Disabled
|
||||||
public class StoreApiTest {
|
public class StoreApiTest {
|
||||||
|
|
||||||
private final StoreApi api = new StoreApi();
|
private final StoreApi api = new StoreApi();
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ package org.openapitools.client.api;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.model.User;
|
import org.openapitools.client.model.User;
|
||||||
|
|
||||||
/** API tests for UserApi */
|
/** API tests for UserApi */
|
||||||
@Ignore
|
@Disabled
|
||||||
public class UserApiTest {
|
public class UserApiTest {
|
||||||
|
|
||||||
private final UserApi api = new UserApi();
|
private final UserApi api = new UserApi();
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Pair;
|
import org.openapitools.client.Pair;
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.junit.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.openapitools.client.ApiException;
|
import org.openapitools.client.ApiException;
|
||||||
import org.openapitools.client.Pair;
|
import org.openapitools.client.Pair;
|
||||||
|
|
||||||
public class HttpBasicAuthTest {
|
public class HttpBasicAuthTest {
|
||||||
HttpBasicAuth auth = null;
|
HttpBasicAuth auth = null;
|
||||||
|
|
||||||
@Before
|
@BeforeEach
|
||||||
public void setup() {
|
public void setup() {
|
||||||
auth = new HttpBasicAuth();
|
auth = new HttpBasicAuth();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.mockito.ArgumentMatchers.any;
|
import static org.mockito.ArgumentMatchers.any;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
@@ -12,6 +12,7 @@ import java.util.concurrent.Callable;
|
|||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
import okhttp3.*;
|
import okhttp3.*;
|
||||||
import okhttp3.Interceptor.Chain;
|
import okhttp3.Interceptor.Chain;
|
||||||
import okhttp3.Response.Builder;
|
import okhttp3.Response.Builder;
|
||||||
@@ -21,8 +22,8 @@ import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
|
|||||||
import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
|
import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
|
||||||
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
|
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
|
||||||
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
|
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
|
||||||
import org.junit.Before;
|
import org.junit.jupiter.api.*;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.mockito.invocation.InvocationOnMock;
|
import org.mockito.invocation.InvocationOnMock;
|
||||||
import org.mockito.stubbing.Answer;
|
import org.mockito.stubbing.Answer;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ public class RetryingOAuthTest {
|
|||||||
|
|
||||||
private RetryingOAuth oauth;
|
private RetryingOAuth oauth;
|
||||||
|
|
||||||
@Before
|
@BeforeEach
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
oauth =
|
oauth =
|
||||||
new RetryingOAuth(
|
new RetryingOAuth(
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.openapitools.client.model.Cat;
|
import org.openapitools.client.model.Cat;
|
||||||
import org.openapitools.client.model.Dog;
|
import org.openapitools.client.model.Dog;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.openapitools.client.model.ReadOnlyFirst;
|
import org.openapitools.client.model.ReadOnlyFirst;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.openapitools.client.model.Animal;
|
import org.openapitools.client.model.Animal;
|
||||||
import org.openapitools.client.model.CatAllOf;
|
import org.openapitools.client.model.CatAllOf;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.openapitools.client.model.QuadrilateralInterface;
|
import org.openapitools.client.model.QuadrilateralInterface;
|
||||||
import org.openapitools.client.model.ShapeInterface;
|
import org.openapitools.client.model.ShapeInterface;
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Ignore;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user