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:
martin-mfg
2024-12-15 10:09:58 +01:00
committed by GitHub
parent 4e5a828c12
commit d87a70dd93
2192 changed files with 12623 additions and 9212 deletions

View File

@@ -1,7 +1,10 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
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.Test;
import org.junit.jupiter.api.BeforeEach;
@@ -25,6 +28,89 @@ class BodyApiTest {
}
/**
* Test binary (gif) response body
*
* Test binary (gif) response body
*/
@Test
void testBinaryGifTest() {
// File response = api.testBinaryGif();
// TODO: test validations
}
/**
* Test body parameter(s)
*
* Test body parameter(s)
*/
@Test
void testBodyApplicationOctetstreamBinaryTest() {
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
*/
@Test
void testBodyMultipartFormdataArrayOfBinaryTest() {
List<File> files = null;
// String response = api.testBodyMultipartFormdataArrayOfBinary(files);
// TODO: test validations
}
/**
* Test single binary in multipart mime
*
* Test single binary in multipart mime
*/
@Test
void testBodyMultipartFormdataSingleBinaryTest() {
File myFile = null;
// String response = api.testBodyMultipartFormdataSingleBinary(myFile);
// TODO: test validations
}
/**
* Test body parameter(s)
*
* Test body parameter(s)
*/
@Test
void testEchoBodyAllOfPetTest() {
Pet pet = null;
// Pet response = api.testEchoBodyAllOfPet(pet);
// TODO: test validations
}
/**
* Test free form object
*
* Test free form object
*/
@Test
void testEchoBodyFreeFormObjectResponseStringTest() {
Object body = null;
// String response = api.testEchoBodyFreeFormObjectResponseString(body);
// TODO: test validations
}
/**
* Test body parameter(s)
*
@@ -39,4 +125,46 @@ class BodyApiTest {
}
/**
* Test empty response body
*
* Test empty response body
*/
@Test
void testEchoBodyPetResponseStringTest() {
Pet pet = null;
// String response = api.testEchoBodyPetResponseString(pet);
// TODO: test validations
}
/**
* Test string enum response body
*
* Test string enum response body
*/
@Test
void testEchoBodyStringEnumTest() {
String body = null;
// StringEnumRef response = api.testEchoBodyStringEnum(body);
// TODO: test validations
}
/**
* Test empty json (request body)
*
* Test empty json (request body)
*/
@Test
void testEchoBodyTagResponseStringTest() {
Tag tag = null;
// String response = api.testEchoBodyTagResponseString(tag);
// TODO: test validations
}
}

View File

@@ -1,6 +1,7 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.TestFormObjectMultipartRequestMarker;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
@@ -40,4 +41,37 @@ class FormApiTest {
}
/**
* Test form parameter(s) for multipart schema
*
* Test form parameter(s) for multipart schema
*/
@Test
void testFormObjectMultipartTest() {
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
*/
@Test
void testFormOneofTest() {
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
}
}

View File

@@ -1,6 +1,7 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.StringEnumRef;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
@@ -30,11 +31,13 @@ class HeaderApiTest {
* Test header parameter(s)
*/
@Test
void testHeaderIntegerBooleanStringTest() {
void testHeaderIntegerBooleanStringEnumsTest() {
Integer integerHeader = null;
Boolean booleanHeader = null;
String stringHeader = null;
// String response = api.testHeaderIntegerBooleanString(integerHeader, booleanHeader, stringHeader);
String enumNonrefStringHeader = null;
StringEnumRef enumRefStringHeader = null;
// String response = api.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader);
// TODO: test validations
}

View File

@@ -1,6 +1,7 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.StringEnumRef;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
@@ -30,10 +31,12 @@ class PathApiTest {
* Test path parameter(s)
*/
@Test
void testsPathStringPathStringIntegerPathIntegerTest() {
void testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathTest() {
String pathString = null;
Integer pathInteger = null;
// String response = api.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger);
String enumNonrefStringPath = null;
StringEnumRef enumRefStringPath = null;
// String response = api.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath);
// TODO: test validations
}

View File

@@ -1,7 +1,12 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
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.Test;
import org.junit.jupiter.api.BeforeEach;
@@ -26,6 +31,72 @@ class QueryApiTest {
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*/
@Test
void testEnumRefStringTest() {
String enumNonrefStringQuery = null;
StringEnumRef enumRefStringQuery = null;
// String response = api.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testEnumRefStringTestQueryMap() {
QueryApi.TestEnumRefStringQueryParams queryParams = new QueryApi.TestEnumRefStringQueryParams()
.enumNonrefStringQuery(null)
.enumRefStringQuery(null);
// String response = api.testEnumRefString(queryParams);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*/
@Test
void testQueryDatetimeDateStringTest() {
OffsetDateTime datetimeQuery = null;
LocalDate dateQuery = null;
String stringQuery = null;
// String response = api.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testQueryDatetimeDateStringTestQueryMap() {
QueryApi.TestQueryDatetimeDateStringQueryParams queryParams = new QueryApi.TestQueryDatetimeDateStringQueryParams()
.datetimeQuery(null)
.dateQuery(null)
.stringQuery(null);
// String response = api.testQueryDatetimeDateString(queryParams);
// TODO: test validations
}
/**
* Test query parameter(s)
*
@@ -60,6 +131,126 @@ class QueryApiTest {
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*/
@Test
void testQueryStyleDeepObjectExplodeTrueObjectTest() {
Pet queryObject = null;
// String response = api.testQueryStyleDeepObjectExplodeTrueObject(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testQueryStyleDeepObjectExplodeTrueObjectTestQueryMap() {
QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectQueryParams queryParams = new QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectQueryParams()
.queryObject(null);
// String response = api.testQueryStyleDeepObjectExplodeTrueObject(queryParams);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*/
@Test
void testQueryStyleDeepObjectExplodeTrueObjectAllOfTest() {
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null;
// String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testQueryStyleDeepObjectExplodeTrueObjectAllOfTestQueryMap() {
QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryParams queryParams = new QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryParams()
.queryObject(null);
// String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryParams);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*/
@Test
void testQueryStyleFormExplodeFalseArrayIntegerTest() {
List<Integer> queryObject = null;
// String response = api.testQueryStyleFormExplodeFalseArrayInteger(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testQueryStyleFormExplodeFalseArrayIntegerTestQueryMap() {
QueryApi.TestQueryStyleFormExplodeFalseArrayIntegerQueryParams queryParams = new QueryApi.TestQueryStyleFormExplodeFalseArrayIntegerQueryParams()
.queryObject(null);
// String response = api.testQueryStyleFormExplodeFalseArrayInteger(queryParams);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*/
@Test
void testQueryStyleFormExplodeFalseArrayStringTest() {
List<String> queryObject = null;
// String response = api.testQueryStyleFormExplodeFalseArrayString(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testQueryStyleFormExplodeFalseArrayStringTestQueryMap() {
QueryApi.TestQueryStyleFormExplodeFalseArrayStringQueryParams queryParams = new QueryApi.TestQueryStyleFormExplodeFalseArrayStringQueryParams()
.queryObject(null);
// String response = api.testQueryStyleFormExplodeFalseArrayString(queryParams);
// TODO: test validations
}
/**
* Test query parameter(s)
*
@@ -120,4 +311,34 @@ class QueryApiTest {
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*/
@Test
void testQueryStyleFormExplodeTrueObjectAllOfTest() {
DataQuery queryObject = null;
// String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* This tests the overload of the method that uses a Map for query parameters instead of
* listing them out individually.
*/
@Test
void testQueryStyleFormExplodeTrueObjectAllOfTestQueryMap() {
QueryApi.TestQueryStyleFormExplodeTrueObjectAllOfQueryParams queryParams = new QueryApi.TestQueryStyleFormExplodeTrueObjectAllOfQueryParams()
.queryObject(null);
// String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryParams);
// TODO: test validations
}
}

View File

@@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import org.junit.jupiter.api.Test;
/**
* Model tests for Bird
*/

View File

@@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import org.junit.jupiter.api.Test;
/**
* Model tests for Category
*/

View File

@@ -21,11 +21,11 @@ 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.Test;
/**
* Model tests for DataQuery
*/
@@ -40,22 +40,6 @@ class DataQueryTest {
// TODO: test DataQuery
}
/**
* Test the property 'text'
*/
@Test
void textTest() {
// TODO: test text
}
/**
* Test the property 'date'
*/
@Test
void dateTest() {
// TODO: test date
}
/**
* Test the property 'id'
*/
@@ -72,4 +56,28 @@ class DataQueryTest {
// TODO: test outcomes
}
/**
* Test the property 'suffix'
*/
@Test
void suffixTest() {
// TODO: test suffix
}
/**
* Test the property 'text'
*/
@Test
void textTest() {
// TODO: test text
}
/**
* Test the property 'date'
*/
@Test
void dateTest() {
// TODO: test date
}
}

View File

@@ -20,11 +20,12 @@ 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.Test;
/**
* Model tests for DefaultValue
*/
@@ -39,6 +40,14 @@ class DefaultValueTest {
// TODO: test DefaultValue
}
/**
* Test the property 'arrayStringEnumRefDefault'
*/
@Test
void arrayStringEnumRefDefaultTest() {
// TODO: test arrayStringEnumRefDefault
}
/**
* Test the property 'arrayStringEnumDefault'
*/
@@ -79,6 +88,14 @@ class DefaultValueTest {
// TODO: test arrayStringNullable
}
/**
* Test the property 'arrayStringExtensionNullable'
*/
@Test
void arrayStringExtensionNullableTest() {
// TODO: test arrayStringExtensionNullable
}
/**
* Test the property 'stringNullable'
*/

View File

@@ -22,7 +22,6 @@ import java.io.IOException;
import java.math.BigDecimal;
import org.junit.jupiter.api.Test;
/**
* Model tests for NumberPropertiesOnly
*/

View File

@@ -20,12 +20,12 @@ 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.Test;
/**
* Model tests for Pet
*/

View File

@@ -20,10 +20,10 @@ 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.Test;
/**
* Model tests for Query
*/

View File

@@ -16,7 +16,6 @@ package org.openapitools.client.model;
import com.google.gson.annotations.SerializedName;
import org.junit.jupiter.api.Test;
/**
* Model tests for StringEnumRef
*/

View File

@@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import org.junit.jupiter.api.Test;
/**
* Model tests for Tag
*/

View File

@@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import org.junit.jupiter.api.Test;
/**
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
*/

View File

@@ -20,10 +20,10 @@ 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.Test;
/**
* Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
*/