Skip to content

Commit

Permalink
[java-jersey2-java6] Update failing old tests
Browse files Browse the repository at this point in the history
Pull-request OpenAPITools#4666 changed jersey generation, but didn't update the
test samples Tests now succeed.

on-behalf-of: @nqminds <info@nquiringminds.com>
  • Loading branch information
aloisklink committed May 11, 2020
1 parent d14502e commit 30c6d2e
Show file tree
Hide file tree
Showing 51 changed files with 283 additions and 142 deletions.
1 change: 1 addition & 0 deletions bin/java-petstore-jersey2-java6.sh
Expand Up @@ -31,6 +31,7 @@ ags="generate --artifact-id petstore-jersey2-java6 -i modules/openapi-generator/

echo "Removing files and folders under samples/client/petstore/java/jersey2-java6/src/main"
rm -rf samples/client/petstore/java/jersey2-java6/src/main
rm -rf samples/client/petstore/java/jersey2-java6/src/test
find samples/client/petstore/java/jersey2-java6 -maxdepth 1 -type f ! -name "README.md" -exec rm {} +

echo "Restoring build.gradle ... "
Expand Down
Expand Up @@ -2,7 +2,7 @@
* 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: \" \\
*
* 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).
Expand Down Expand Up @@ -35,16 +35,15 @@ public class AnotherFakeApiTest {
/**
* To test special tags
*
* To test special tags
* To test special tags and operation ID starting with number
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testSpecialTagsTest() throws ApiException {
Client client = null;
Client response = api.testSpecialTags(client);

public void call123testSpecialTagsTest() throws ApiException {
Client body = null;
Client response = api.call123testSpecialTags(body);
// TODO: test validations
}

Expand Down
Expand Up @@ -2,7 +2,7 @@
* 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: \" \\
*
* 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).
Expand All @@ -22,6 +22,7 @@
import org.threeten.bp.OffsetDateTime;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.User;
import org.openapitools.client.model.XmlItem;
import org.junit.Test;
import org.junit.Ignore;

Expand All @@ -39,6 +40,21 @@ public class FakeApiTest {
private final FakeApi api = new FakeApi();


/**
* creates an XmlItem
*
* this route creates an XmlItem
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createXmlItemTest() throws ApiException {
XmlItem xmlItem = null;
api.createXmlItem(xmlItem);
// TODO: test validations
}

/**
*
*
Expand All @@ -51,7 +67,6 @@ public class FakeApiTest {
public void fakeOuterBooleanSerializeTest() throws ApiException {
Boolean body = null;
Boolean response = api.fakeOuterBooleanSerialize(body);

// TODO: test validations
}

Expand All @@ -65,9 +80,8 @@ public void fakeOuterBooleanSerializeTest() throws ApiException {
*/
@Test
public void fakeOuterCompositeSerializeTest() throws ApiException {
OuterComposite outerComposite = null;
OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);

OuterComposite body = null;
OuterComposite response = api.fakeOuterCompositeSerialize(body);
// TODO: test validations
}

Expand All @@ -83,7 +97,6 @@ public void fakeOuterCompositeSerializeTest() throws ApiException {
public void fakeOuterNumberSerializeTest() throws ApiException {
BigDecimal body = null;
BigDecimal response = api.fakeOuterNumberSerialize(body);

// TODO: test validations
}

Expand All @@ -99,7 +112,6 @@ public void fakeOuterNumberSerializeTest() throws ApiException {
public void fakeOuterStringSerializeTest() throws ApiException {
String body = null;
String response = api.fakeOuterStringSerialize(body);

// TODO: test validations
}

Expand All @@ -113,9 +125,8 @@ public void fakeOuterStringSerializeTest() throws ApiException {
*/
@Test
public void testBodyWithFileSchemaTest() throws ApiException {
FileSchemaTestClass fileSchemaTestClass = null;
api.testBodyWithFileSchema(fileSchemaTestClass);

FileSchemaTestClass body = null;
api.testBodyWithFileSchema(body);
// TODO: test validations
}

Expand All @@ -130,9 +141,8 @@ public void testBodyWithFileSchemaTest() throws ApiException {
@Test
public void testBodyWithQueryParamsTest() throws ApiException {
String query = null;
User user = null;
api.testBodyWithQueryParams(query, user);

User body = null;
api.testBodyWithQueryParams(query, body);
// TODO: test validations
}

Expand All @@ -146,16 +156,15 @@ public void testBodyWithQueryParamsTest() throws ApiException {
*/
@Test
public void testClientModelTest() throws ApiException {
Client client = null;
Client response = api.testClientModel(client);

Client body = null;
Client response = api.testClientModel(body);
// 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
* if the Api call fails
Expand All @@ -177,7 +186,6 @@ public void testEndpointParametersTest() throws ApiException {
String password = null;
String paramCallback = null;
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);

// TODO: test validations
}

Expand All @@ -200,7 +208,6 @@ public void testEnumParametersTest() throws ApiException {
List<String> enumFormStringArray = null;
String enumFormString = null;
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);

// TODO: test validations
}

Expand All @@ -220,8 +227,14 @@ public void testGroupParametersTest() throws ApiException {
Integer stringGroup = null;
Boolean booleanGroup = null;
Long int64Group = null;
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);

api.testGroupParameters()
.requiredStringGroup(requiredStringGroup)
.requiredBooleanGroup(requiredBooleanGroup)
.requiredInt64Group(requiredInt64Group)
.stringGroup(stringGroup)
.booleanGroup(booleanGroup)
.int64Group(int64Group)
.execute();
// TODO: test validations
}

Expand All @@ -235,9 +248,8 @@ public void testGroupParametersTest() throws ApiException {
*/
@Test
public void testInlineAdditionalPropertiesTest() throws ApiException {
Map<String, String> requestBody = null;
api.testInlineAdditionalProperties(requestBody);

Map<String, String> param = null;
api.testInlineAdditionalProperties(param);
// TODO: test validations
}

Expand All @@ -254,7 +266,25 @@ public void testJsonFormDataTest() throws ApiException {
String param = null;
String param2 = null;
api.testJsonFormData(param, param2);

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

Expand Down
Expand Up @@ -2,7 +2,7 @@
* 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: \" \\
*
* 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).
Expand Down Expand Up @@ -42,9 +42,8 @@ public class FakeClassnameTags123ApiTest {
*/
@Test
public void testClassnameTest() throws ApiException {
Client client = null;
Client response = api.testClassname(client);

Client body = null;
Client response = api.testClassname(body);
// TODO: test validations
}

Expand Down
Expand Up @@ -2,7 +2,7 @@
* 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: \" \\
*
* 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).
Expand Down Expand Up @@ -44,9 +44,8 @@ public class PetApiTest {
*/
@Test
public void addPetTest() throws ApiException {
Pet pet = null;
api.addPet(pet);

Pet body = null;
api.addPet(body);
// TODO: test validations
}

Expand All @@ -63,7 +62,6 @@ public void deletePetTest() throws ApiException {
Long petId = null;
String apiKey = null;
api.deletePet(petId, apiKey);

// TODO: test validations
}

Expand All @@ -79,7 +77,6 @@ public void deletePetTest() throws ApiException {
public void findPetsByStatusTest() throws ApiException {
List<String> status = null;
List<Pet> response = api.findPetsByStatus(status);

// TODO: test validations
}

Expand All @@ -95,7 +92,6 @@ public void findPetsByStatusTest() throws ApiException {
public void findPetsByTagsTest() throws ApiException {
List<String> tags = null;
List<Pet> response = api.findPetsByTags(tags);

// TODO: test validations
}

Expand All @@ -111,7 +107,6 @@ public void findPetsByTagsTest() throws ApiException {
public void getPetByIdTest() throws ApiException {
Long petId = null;
Pet response = api.getPetById(petId);

// TODO: test validations
}

Expand All @@ -125,9 +120,8 @@ public void getPetByIdTest() throws ApiException {
*/
@Test
public void updatePetTest() throws ApiException {
Pet pet = null;
api.updatePet(pet);

Pet body = null;
api.updatePet(body);
// TODO: test validations
}

Expand All @@ -145,7 +139,6 @@ public void updatePetWithFormTest() throws ApiException {
String name = null;
String status = null;
api.updatePetWithForm(petId, name, status);

// TODO: test validations
}

Expand All @@ -163,7 +156,6 @@ public void uploadFileTest() throws ApiException {
String additionalMetadata = null;
File file = null;
ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);

// TODO: test validations
}

Expand All @@ -181,7 +173,6 @@ public void uploadFileWithRequiredFileTest() throws ApiException {
File requiredFile = null;
String additionalMetadata = null;
ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);

// TODO: test validations
}

Expand Down
Expand Up @@ -2,7 +2,7 @@
* 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: \" \\
*
* 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).
Expand Down Expand Up @@ -44,7 +44,6 @@ public class StoreApiTest {
public void deleteOrderTest() throws ApiException {
String orderId = null;
api.deleteOrder(orderId);

// TODO: test validations
}

Expand All @@ -59,7 +58,6 @@ public void deleteOrderTest() throws ApiException {
@Test
public void getInventoryTest() throws ApiException {
Map<String, Integer> response = api.getInventory();

// TODO: test validations
}

Expand All @@ -75,7 +73,6 @@ public void getInventoryTest() throws ApiException {
public void getOrderByIdTest() throws ApiException {
Long orderId = null;
Order response = api.getOrderById(orderId);

// TODO: test validations
}

Expand All @@ -89,9 +86,8 @@ public void getOrderByIdTest() throws ApiException {
*/
@Test
public void placeOrderTest() throws ApiException {
Order order = null;
Order response = api.placeOrder(order);

Order body = null;
Order response = api.placeOrder(body);
// TODO: test validations
}

Expand Down

0 comments on commit 30c6d2e

Please sign in to comment.