mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 18:07:06 +00:00
update sample tests, fix Java tests (#20300)
* replace removed forkMode * remove junit runner where it's not needed * update samples without skipping test files, but skip files named "FILES" * revert overwriting custom tests, add custom java tests to list * add one sample to CircleCI, fix various Java tests
This commit is contained in:
@@ -14,7 +14,10 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.StringEnumRef;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -31,6 +34,89 @@ public class BodyApiTest {
|
||||
|
||||
private final BodyApi api = new BodyApi();
|
||||
|
||||
/**
|
||||
* Test binary (gif) response body
|
||||
*
|
||||
* Test binary (gif) response body
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testBinaryGifTest() throws ApiException {
|
||||
File response = api.testBinaryGif();
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
*
|
||||
* Test body parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testBodyApplicationOctetstreamBinaryTest() throws ApiException {
|
||||
File body = null;
|
||||
String response = api.testBodyApplicationOctetstreamBinary(body);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test array of binary in multipart mime
|
||||
*
|
||||
* Test array of binary in multipart mime
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testBodyMultipartFormdataArrayOfBinaryTest() throws ApiException {
|
||||
List<File> files = null;
|
||||
String response = api.testBodyMultipartFormdataArrayOfBinary(files);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test single binary in multipart mime
|
||||
*
|
||||
* Test single binary in multipart mime
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testBodyMultipartFormdataSingleBinaryTest() throws ApiException {
|
||||
File myFile = null;
|
||||
String response = api.testBodyMultipartFormdataSingleBinary(myFile);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
*
|
||||
* Test body parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testEchoBodyAllOfPetTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
Pet response = api.testEchoBodyAllOfPet(pet);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
*
|
||||
* Test free form object
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testEchoBodyFreeFormObjectResponseStringTest() throws ApiException {
|
||||
Object body = null;
|
||||
String response = api.testEchoBodyFreeFormObjectResponseString(body);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
*
|
||||
@@ -45,4 +131,46 @@ public class BodyApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test empty response body
|
||||
*
|
||||
* Test empty response body
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testEchoBodyPetResponseStringTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
String response = api.testEchoBodyPetResponseString(pet);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test string enum response body
|
||||
*
|
||||
* Test string enum response body
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testEchoBodyStringEnumTest() throws ApiException {
|
||||
String body = null;
|
||||
StringEnumRef response = api.testEchoBodyStringEnum(body);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
*
|
||||
* Test empty json (request body)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testEchoBodyTagResponseStringTest() throws ApiException {
|
||||
Tag tag = null;
|
||||
String response = api.testEchoBodyTagResponseString(tag);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.TestFormObjectMultipartRequestMarker;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -46,4 +47,37 @@ public class FormApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s) for multipart schema
|
||||
*
|
||||
* Test form parameter(s) for multipart schema
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testFormObjectMultipartTest() throws ApiException {
|
||||
TestFormObjectMultipartRequestMarker marker = null;
|
||||
String response = api.testFormObjectMultipart(marker);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form parameter(s) for oneOf schema
|
||||
*
|
||||
* Test form parameter(s) for oneOf schema
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testFormOneofTest() throws ApiException {
|
||||
String form1 = null;
|
||||
Integer form2 = null;
|
||||
String form3 = null;
|
||||
Boolean form4 = null;
|
||||
Long id = null;
|
||||
String name = null;
|
||||
String response = api.testFormOneof(form1, form2, form3, form4, id, name);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.DataQuery;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.StringEnumRef;
|
||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
@@ -33,6 +37,37 @@ public class QueryApiTest {
|
||||
|
||||
private final QueryApi api = new QueryApi();
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testEnumRefStringTest() throws ApiException {
|
||||
String enumNonrefStringQuery = null;
|
||||
StringEnumRef enumRefStringQuery = null;
|
||||
String response = api.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testQueryDatetimeDateStringTest() throws ApiException {
|
||||
OffsetDateTime datetimeQuery = null;
|
||||
LocalDate dateQuery = null;
|
||||
String stringQuery = null;
|
||||
String response = api.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
*
|
||||
@@ -77,6 +112,34 @@ public class QueryApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testQueryStyleFormExplodeFalseArrayIntegerTest() throws ApiException {
|
||||
List<Integer> queryObject = null;
|
||||
String response = api.testQueryStyleFormExplodeFalseArrayInteger(queryObject);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testQueryStyleFormExplodeFalseArrayStringTest() throws ApiException {
|
||||
List<String> queryObject = null;
|
||||
String response = api.testQueryStyleFormExplodeFalseArrayString(queryObject);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
*
|
||||
@@ -105,4 +168,18 @@ public class QueryApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testQueryStyleFormExplodeTrueObjectAllOfTest() throws ApiException {
|
||||
DataQuery queryObject = null;
|
||||
String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Bird
|
||||
*/
|
||||
|
||||
@@ -19,10 +19,10 @@ import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Category
|
||||
*/
|
||||
|
||||
@@ -21,12 +21,12 @@ import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.Query;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for DataQuery
|
||||
*/
|
||||
@@ -41,22 +41,6 @@ public class DataQueryTest {
|
||||
// TODO: test DataQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'text'
|
||||
*/
|
||||
@Test
|
||||
public void textTest() {
|
||||
// TODO: test text
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'date'
|
||||
*/
|
||||
@Test
|
||||
public void dateTest() {
|
||||
// TODO: test date
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@@ -73,4 +57,28 @@ public class DataQueryTest {
|
||||
// TODO: test outcomes
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'suffix'
|
||||
*/
|
||||
@Test
|
||||
public void suffixTest() {
|
||||
// TODO: test suffix
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'text'
|
||||
*/
|
||||
@Test
|
||||
public void textTest() {
|
||||
// TODO: test text
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'date'
|
||||
*/
|
||||
@Test
|
||||
public void dateTest() {
|
||||
// TODO: test date
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,12 +20,13 @@ import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.StringEnumRef;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for DefaultValue
|
||||
*/
|
||||
@@ -40,6 +41,14 @@ public class DefaultValueTest {
|
||||
// TODO: test DefaultValue
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'arrayStringEnumRefDefault'
|
||||
*/
|
||||
@Test
|
||||
public void arrayStringEnumRefDefaultTest() {
|
||||
// TODO: test arrayStringEnumRefDefault
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'arrayStringEnumDefault'
|
||||
*/
|
||||
@@ -80,6 +89,14 @@ public class DefaultValueTest {
|
||||
// TODO: test arrayStringNullable
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'arrayStringExtensionNullable'
|
||||
*/
|
||||
@Test
|
||||
public void arrayStringExtensionNullableTest() {
|
||||
// TODO: test arrayStringExtensionNullable
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'stringNullable'
|
||||
*/
|
||||
|
||||
@@ -20,10 +20,10 @@ import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for NumberPropertiesOnly
|
||||
*/
|
||||
|
||||
@@ -20,13 +20,13 @@ import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Pet
|
||||
*/
|
||||
|
||||
@@ -20,11 +20,11 @@ import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Query
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.google.gson.annotations.SerializedName;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for StringEnumRef
|
||||
*/
|
||||
|
||||
@@ -19,10 +19,10 @@ import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Tag
|
||||
*/
|
||||
|
||||
@@ -19,10 +19,10 @@ import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
|
||||
@@ -20,11 +20,11 @@ import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user