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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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'
*/

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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