Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed May 23, 2024
1 parent 0a8ee0c commit f10bc04
Show file tree
Hide file tree
Showing 26 changed files with 541 additions and 414 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ public class {{classname}}Test {
*/
@Test
public void {{operationId}}Test() {
// uncomment below to test the function
{{#allParams}}
{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.AbstractResource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null;
//{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.AbstractResource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null;
{{/allParams}}
{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}.block(){{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}.block(){{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}};
//{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}.block(){{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}.block(){{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}};

// TODO: test validations
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class ResourceApiTest {
*/
@Test
public void resourceInResponseTest() {
org.springframework.core.io.Resource response = api.resourceInResponse().block();
// uncomment below to test the function
//org.springframework.core.io.Resource response = api.resourceInResponse().block();

// TODO: test validations
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ public class AnotherFakeApiTest {
*/
@Test
public void call123testSpecialTagsTest() {
Client client = null;
Client response = api.call123testSpecialTags(client).block();
// uncomment below to test the function
//Client client = null;
//Client response = api.call123testSpecialTags(client).block();

// TODO: test validations
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class DefaultApiTest {
*/
@Test
public void fooGetTest() {
FooGetDefaultResponse response = api.fooGet().block();
// uncomment below to test the function
//FooGetDefaultResponse response = api.fooGet().block();

// TODO: test validations
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public class FakeApiTest {
*/
@Test
public void fakeBigDecimalMapTest() {
FakeBigDecimalMap200Response response = api.fakeBigDecimalMap().block();
// uncomment below to test the function
//FakeBigDecimalMap200Response response = api.fakeBigDecimalMap().block();

// TODO: test validations
}
Expand All @@ -66,7 +67,8 @@ public void fakeBigDecimalMapTest() {
*/
@Test
public void fakeHealthGetTest() {
HealthCheckResult response = api.fakeHealthGet().block();
// uncomment below to test the function
//HealthCheckResult response = api.fakeHealthGet().block();

// TODO: test validations
}
Expand All @@ -78,10 +80,11 @@ public void fakeHealthGetTest() {
*/
@Test
public void fakeHttpSignatureTestTest() {
Pet pet = null;
String query1 = null;
String header1 = null;
api.fakeHttpSignatureTest(pet, query1, header1).block();
// uncomment below to test the function
//Pet pet = null;
//String query1 = null;
//String header1 = null;
//api.fakeHttpSignatureTest(pet, query1, header1).block();

// TODO: test validations
}
Expand All @@ -93,8 +96,9 @@ public void fakeHttpSignatureTestTest() {
*/
@Test
public void fakeOuterBooleanSerializeTest() {
Boolean body = null;
Boolean response = api.fakeOuterBooleanSerialize(body).block();
// uncomment below to test the function
//Boolean body = null;
//Boolean response = api.fakeOuterBooleanSerialize(body).block();

// TODO: test validations
}
Expand All @@ -106,8 +110,9 @@ public void fakeOuterBooleanSerializeTest() {
*/
@Test
public void fakeOuterCompositeSerializeTest() {
OuterComposite outerComposite = null;
OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite).block();
// uncomment below to test the function
//OuterComposite outerComposite = null;
//OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite).block();

// TODO: test validations
}
Expand All @@ -119,8 +124,9 @@ public void fakeOuterCompositeSerializeTest() {
*/
@Test
public void fakeOuterNumberSerializeTest() {
BigDecimal body = null;
BigDecimal response = api.fakeOuterNumberSerialize(body).block();
// uncomment below to test the function
//BigDecimal body = null;
//BigDecimal response = api.fakeOuterNumberSerialize(body).block();

// TODO: test validations
}
Expand All @@ -132,8 +138,9 @@ public void fakeOuterNumberSerializeTest() {
*/
@Test
public void fakeOuterStringSerializeTest() {
String body = null;
String response = api.fakeOuterStringSerialize(body).block();
// uncomment below to test the function
//String body = null;
//String response = api.fakeOuterStringSerialize(body).block();

// TODO: test validations
}
Expand All @@ -145,8 +152,9 @@ public void fakeOuterStringSerializeTest() {
*/
@Test
public void fakePropertyEnumIntegerSerializeTest() {
OuterObjectWithEnumProperty outerObjectWithEnumProperty = null;
OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty).block();
// uncomment below to test the function
//OuterObjectWithEnumProperty outerObjectWithEnumProperty = null;
//OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty).block();

// TODO: test validations
}
Expand All @@ -158,8 +166,9 @@ public void fakePropertyEnumIntegerSerializeTest() {
*/
@Test
public void testAdditionalPropertiesReferenceTest() {
Map<String, Object> requestBody = null;
api.testAdditionalPropertiesReference(requestBody).block();
// uncomment below to test the function
//Map<String, Object> requestBody = null;
//api.testAdditionalPropertiesReference(requestBody).block();

// TODO: test validations
}
Expand All @@ -171,8 +180,9 @@ public void testAdditionalPropertiesReferenceTest() {
*/
@Test
public void testBodyWithBinaryTest() {
File body = null;
api.testBodyWithBinary(body).block();
// uncomment below to test the function
//File body = null;
//api.testBodyWithBinary(body).block();

// TODO: test validations
}
Expand All @@ -184,8 +194,9 @@ public void testBodyWithBinaryTest() {
*/
@Test
public void testBodyWithFileSchemaTest() {
FileSchemaTestClass fileSchemaTestClass = null;
api.testBodyWithFileSchema(fileSchemaTestClass).block();
// uncomment below to test the function
//FileSchemaTestClass fileSchemaTestClass = null;
//api.testBodyWithFileSchema(fileSchemaTestClass).block();

// TODO: test validations
}
Expand All @@ -197,9 +208,10 @@ public void testBodyWithFileSchemaTest() {
*/
@Test
public void testBodyWithQueryParamsTest() {
String query = null;
User user = null;
api.testBodyWithQueryParams(query, user).block();
// uncomment below to test the function
//String query = null;
//User user = null;
//api.testBodyWithQueryParams(query, user).block();

// TODO: test validations
}
Expand All @@ -211,8 +223,9 @@ public void testBodyWithQueryParamsTest() {
*/
@Test
public void testClientModelTest() {
Client client = null;
Client response = api.testClientModel(client).block();
// uncomment below to test the function
//Client client = null;
//Client response = api.testClientModel(client).block();

// TODO: test validations
}
Expand All @@ -224,21 +237,22 @@ public void testClientModelTest() {
*/
@Test
public void testEndpointParametersTest() {
BigDecimal number = null;
Double _double = null;
String patternWithoutDelimiter = null;
byte[] _byte = null;
Integer integer = null;
Integer int32 = null;
Long int64 = null;
Float _float = null;
String string = null;
File binary = null;
LocalDate date = null;
OffsetDateTime dateTime = null;
String password = null;
String paramCallback = null;
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback).block();
// uncomment below to test the function
//BigDecimal number = null;
//Double _double = null;
//String patternWithoutDelimiter = null;
//byte[] _byte = null;
//Integer integer = null;
//Integer int32 = null;
//Long int64 = null;
//Float _float = null;
//String string = null;
//File binary = null;
//LocalDate date = null;
//OffsetDateTime dateTime = null;
//String password = null;
//String paramCallback = null;
//api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback).block();

// TODO: test validations
}
Expand All @@ -250,16 +264,17 @@ public void testEndpointParametersTest() {
*/
@Test
public void testEnumParametersTest() {
List<String> enumHeaderStringArray = null;
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
List<EnumClass> enumQueryModelArray = null;
List<String> enumFormStringArray = null;
String enumFormString = null;
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString).block();
// uncomment below to test the function
//List<String> enumHeaderStringArray = null;
//String enumHeaderString = null;
//List<String> enumQueryStringArray = null;
//String enumQueryString = null;
//Integer enumQueryInteger = null;
//Double enumQueryDouble = null;
//List<EnumClass> enumQueryModelArray = null;
//List<String> enumFormStringArray = null;
//String enumFormString = null;
//api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString).block();

// TODO: test validations
}
Expand All @@ -271,13 +286,14 @@ public void testEnumParametersTest() {
*/
@Test
public void testGroupParametersTest() {
Integer requiredStringGroup = null;
Boolean requiredBooleanGroup = null;
Long requiredInt64Group = null;
Integer stringGroup = null;
Boolean booleanGroup = null;
Long int64Group = null;
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group).block();
// uncomment below to test the function
//Integer requiredStringGroup = null;
//Boolean requiredBooleanGroup = null;
//Long requiredInt64Group = null;
//Integer stringGroup = null;
//Boolean booleanGroup = null;
//Long int64Group = null;
//api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group).block();

// TODO: test validations
}
Expand All @@ -289,8 +305,9 @@ public void testGroupParametersTest() {
*/
@Test
public void testInlineAdditionalPropertiesTest() {
Map<String, String> requestBody = null;
api.testInlineAdditionalProperties(requestBody).block();
// uncomment below to test the function
//Map<String, String> requestBody = null;
//api.testInlineAdditionalProperties(requestBody).block();

// TODO: test validations
}
Expand All @@ -302,8 +319,9 @@ public void testInlineAdditionalPropertiesTest() {
*/
@Test
public void testInlineFreeformAdditionalPropertiesTest() {
TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = null;
api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest).block();
// uncomment below to test the function
//TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = null;
//api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest).block();

// TODO: test validations
}
Expand All @@ -315,9 +333,10 @@ public void testInlineFreeformAdditionalPropertiesTest() {
*/
@Test
public void testJsonFormDataTest() {
String param = null;
String param2 = null;
api.testJsonFormData(param, param2).block();
// uncomment below to test the function
//String param = null;
//String param2 = null;
//api.testJsonFormData(param, param2).block();

// TODO: test validations
}
Expand All @@ -329,8 +348,9 @@ public void testJsonFormDataTest() {
*/
@Test
public void testNullableTest() {
ChildWithNullable childWithNullable = null;
api.testNullable(childWithNullable).block();
// uncomment below to test the function
//ChildWithNullable childWithNullable = null;
//api.testNullable(childWithNullable).block();

// TODO: test validations
}
Expand All @@ -342,14 +362,15 @@ public void testNullableTest() {
*/
@Test
public void testQueryParameterCollectionFormatTest() {
List<String> pipe = null;
List<String> ioutil = null;
List<String> http = null;
List<String> url = null;
List<String> context = null;
String allowEmpty = null;
Map<String, String> language = null;
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language).block();
// uncomment below to test the function
//List<String> pipe = null;
//List<String> ioutil = null;
//List<String> http = null;
//List<String> url = null;
//List<String> context = null;
//String allowEmpty = null;
//Map<String, String> language = null;
//api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language).block();

// TODO: test validations
}
Expand All @@ -361,8 +382,9 @@ public void testQueryParameterCollectionFormatTest() {
*/
@Test
public void testStringMapReferenceTest() {
Map<String, String> requestBody = null;
api.testStringMapReference(requestBody).block();
// uncomment below to test the function
//Map<String, String> requestBody = null;
//api.testStringMapReference(requestBody).block();

// TODO: test validations
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ public class FakeClassnameTags123ApiTest {
*/
@Test
public void testClassnameTest() {
Client client = null;
Client response = api.testClassname(client).block();
// uncomment below to test the function
//Client client = null;
//Client response = api.testClassname(client).block();

// TODO: test validations
}
Expand Down
Loading

0 comments on commit f10bc04

Please sign in to comment.