forked from loafle/openapi-generator-original
Java: Add basic junit test templates for api clients
This commit is contained in:
parent
5af4156c02
commit
5633fdfb3d
@ -23,6 +23,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends JavaClientCodegen
|
|||||||
public AbstractJavaJAXRSServerCodegen()
|
public AbstractJavaJAXRSServerCodegen()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
apiTestTemplateFiles.clear(); // TODO: add test template
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,6 +19,7 @@ public class GroovyClientCodegen extends JavaClientCodegen {
|
|||||||
outputFolder = "generated-code/groovy";
|
outputFolder = "generated-code/groovy";
|
||||||
modelTemplateFiles.put("model.mustache", ".groovy");
|
modelTemplateFiles.put("model.mustache", ".groovy");
|
||||||
apiTemplateFiles.put(templateFileName, ".groovy");
|
apiTemplateFiles.put(templateFileName, ".groovy");
|
||||||
|
apiTestTemplateFiles.clear(); // TODO: add test template
|
||||||
embeddedTemplateDir = templateDir = "Groovy";
|
embeddedTemplateDir = templateDir = "Groovy";
|
||||||
|
|
||||||
apiPackage = "io.swagger.api";
|
apiPackage = "io.swagger.api";
|
||||||
|
@ -36,7 +36,9 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
protected String artifactId = "swagger-java-client";
|
protected String artifactId = "swagger-java-client";
|
||||||
protected String artifactVersion = "1.0.0";
|
protected String artifactVersion = "1.0.0";
|
||||||
protected String projectFolder = "src" + File.separator + "main";
|
protected String projectFolder = "src" + File.separator + "main";
|
||||||
|
protected String projectTestFolder = "src" + File.separator + "test";
|
||||||
protected String sourceFolder = projectFolder + File.separator + "java";
|
protected String sourceFolder = projectFolder + File.separator + "java";
|
||||||
|
protected String testFolder = projectTestFolder + File.separator + "java";
|
||||||
protected String localVariablePrefix = "";
|
protected String localVariablePrefix = "";
|
||||||
protected boolean fullJavaUtil;
|
protected boolean fullJavaUtil;
|
||||||
protected String javaUtilPrefix = "";
|
protected String javaUtilPrefix = "";
|
||||||
@ -52,6 +54,7 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
outputFolder = "generated-code" + File.separator + "java";
|
outputFolder = "generated-code" + File.separator + "java";
|
||||||
modelTemplateFiles.put("model.mustache", ".java");
|
modelTemplateFiles.put("model.mustache", ".java");
|
||||||
apiTemplateFiles.put("api.mustache", ".java");
|
apiTemplateFiles.put("api.mustache", ".java");
|
||||||
|
apiTestTemplateFiles.put("api_test.mustache", ".java");
|
||||||
embeddedTemplateDir = templateDir = "Java";
|
embeddedTemplateDir = templateDir = "Java";
|
||||||
apiPackage = "io.swagger.client.api";
|
apiPackage = "io.swagger.client.api";
|
||||||
modelPackage = "io.swagger.client.model";
|
modelPackage = "io.swagger.client.model";
|
||||||
@ -366,6 +369,11 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', '/');
|
return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String apiTestFileFolder() {
|
||||||
|
return outputFolder + "/" + testFolder + "/" + apiPackage().replace('.', '/');
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String modelFileFolder() {
|
public String modelFileFolder() {
|
||||||
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', '/');
|
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', '/');
|
||||||
@ -391,6 +399,11 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
return toModelName(name);
|
return toModelName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toApiTestFilename(String name) {
|
||||||
|
return toApiName(name) + "Test";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toVarName(String name) {
|
public String toVarName(String name) {
|
||||||
// sanitize name
|
// sanitize name
|
||||||
|
@ -25,6 +25,7 @@ public class JavaInflectorServerCodegen extends JavaClientCodegen {
|
|||||||
sourceFolder = "src/gen/java";
|
sourceFolder = "src/gen/java";
|
||||||
modelTemplateFiles.put("model.mustache", ".java");
|
modelTemplateFiles.put("model.mustache", ".java");
|
||||||
apiTemplateFiles.put("api.mustache", ".java");
|
apiTemplateFiles.put("api.mustache", ".java");
|
||||||
|
apiTestTemplateFiles.clear(); // TODO: add test template
|
||||||
embeddedTemplateDir = templateDir = "JavaInflector";
|
embeddedTemplateDir = templateDir = "JavaInflector";
|
||||||
invokerPackage = "io.swagger.handler";
|
invokerPackage = "io.swagger.handler";
|
||||||
artifactId = "swagger-inflector-server";
|
artifactId = "swagger-inflector-server";
|
||||||
|
@ -31,6 +31,7 @@ public class JavaResteasyServerCodegen extends JavaClientCodegen implements Code
|
|||||||
apiTemplateFiles.put("apiService.mustache", ".java");
|
apiTemplateFiles.put("apiService.mustache", ".java");
|
||||||
apiTemplateFiles.put("apiServiceImpl.mustache", ".java");
|
apiTemplateFiles.put("apiServiceImpl.mustache", ".java");
|
||||||
apiTemplateFiles.put("apiServiceFactory.mustache", ".java");
|
apiTemplateFiles.put("apiServiceFactory.mustache", ".java");
|
||||||
|
apiTestTemplateFiles.clear(); // TODO: add test template
|
||||||
apiPackage = "io.swagger.api";
|
apiPackage = "io.swagger.api";
|
||||||
modelPackage = "io.swagger.model";
|
modelPackage = "io.swagger.model";
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ public class SpringBootServerCodegen extends JavaClientCodegen implements Codege
|
|||||||
outputFolder = "generated-code/javaSpringBoot";
|
outputFolder = "generated-code/javaSpringBoot";
|
||||||
modelTemplateFiles.put("model.mustache", ".java");
|
modelTemplateFiles.put("model.mustache", ".java");
|
||||||
apiTemplateFiles.put(templateFileName, ".java");
|
apiTemplateFiles.put(templateFileName, ".java");
|
||||||
|
apiTestTemplateFiles.clear(); // TODO: add test template
|
||||||
embeddedTemplateDir = templateDir = "JavaSpringBoot";
|
embeddedTemplateDir = templateDir = "JavaSpringBoot";
|
||||||
apiPackage = "io.swagger.api";
|
apiPackage = "io.swagger.api";
|
||||||
modelPackage = "io.swagger.model";
|
modelPackage = "io.swagger.model";
|
||||||
|
@ -18,6 +18,7 @@ public class SpringMVCServerCodegen extends JavaClientCodegen implements Codegen
|
|||||||
outputFolder = "generated-code/javaSpringMVC";
|
outputFolder = "generated-code/javaSpringMVC";
|
||||||
modelTemplateFiles.put("model.mustache", ".java");
|
modelTemplateFiles.put("model.mustache", ".java");
|
||||||
apiTemplateFiles.put(templateFileName, ".java");
|
apiTemplateFiles.put(templateFileName, ".java");
|
||||||
|
apiTestTemplateFiles.clear(); // TODO: add test template
|
||||||
embeddedTemplateDir = templateDir = "JavaSpringMVC";
|
embeddedTemplateDir = templateDir = "JavaSpringMVC";
|
||||||
apiPackage = "io.swagger.api";
|
apiPackage = "io.swagger.api";
|
||||||
modelPackage = "io.swagger.model";
|
modelPackage = "io.swagger.model";
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
package {{package}};
|
||||||
|
|
||||||
|
import {{invokerPackage}}.ApiException;
|
||||||
|
{{#imports}}import {{import}};
|
||||||
|
{{/imports}}
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
{{^fullJavaUtil}}
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
{{/fullJavaUtil}}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for {{classname}}
|
||||||
|
*/
|
||||||
|
public class {{classname}}Test {
|
||||||
|
|
||||||
|
private final {{classname}} api = new {{classname}}();
|
||||||
|
|
||||||
|
{{#operations}}{{#operation}}
|
||||||
|
/**
|
||||||
|
* {{summary}}
|
||||||
|
*
|
||||||
|
* {{notes}}
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void {{operationId}}Test() throws ApiException {
|
||||||
|
{{#allParams}}
|
||||||
|
{{{dataType}}} {{paramName}} = null;
|
||||||
|
{{/allParams}}
|
||||||
|
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
{{/operation}}{{/operations}}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package {{package}};
|
||||||
|
|
||||||
|
import {{invokerPackage}}.ApiClient;
|
||||||
|
{{#imports}}import {{import}};
|
||||||
|
{{/imports}}
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
{{^fullJavaUtil}}
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
{{/fullJavaUtil}}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for {{classname}}
|
||||||
|
*/
|
||||||
|
public class {{classname}}Test {
|
||||||
|
|
||||||
|
private {{classname}} api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().buildClient({{classname}}.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
{{#operations}}{{#operation}}
|
||||||
|
/**
|
||||||
|
* {{summary}}
|
||||||
|
*
|
||||||
|
* {{notes}}
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void {{operationId}}Test() {
|
||||||
|
{{#allParams}}
|
||||||
|
{{{dataType}}} {{paramName}} = null;
|
||||||
|
{{/allParams}}
|
||||||
|
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
{{/operation}}{{/operations}}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package {{package}};
|
||||||
|
|
||||||
|
import {{invokerPackage}}.ApiClient;
|
||||||
|
{{#imports}}import {{import}};
|
||||||
|
{{/imports}}
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
{{^fullJavaUtil}}
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
{{/fullJavaUtil}}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for {{classname}}
|
||||||
|
*/
|
||||||
|
public class {{classname}}Test {
|
||||||
|
|
||||||
|
private {{classname}} api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService({{classname}}.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
{{#operations}}{{#operation}}
|
||||||
|
/**
|
||||||
|
* {{summary}}
|
||||||
|
*
|
||||||
|
* {{notes}}
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void {{operationId}}Test() {
|
||||||
|
{{#allParams}}
|
||||||
|
{{{dataType}}} {{paramName}} = null;
|
||||||
|
{{/allParams}}
|
||||||
|
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
{{/operation}}{{/operations}}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package {{package}};
|
||||||
|
|
||||||
|
import {{invokerPackage}}.ApiClient;
|
||||||
|
{{#imports}}import {{import}};
|
||||||
|
{{/imports}}
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
{{^fullJavaUtil}}
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
{{/fullJavaUtil}}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for {{classname}}
|
||||||
|
*/
|
||||||
|
public class {{classname}}Test {
|
||||||
|
|
||||||
|
private {{classname}} api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService({{classname}}.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
{{#operations}}{{#operation}}
|
||||||
|
/**
|
||||||
|
* {{summary}}
|
||||||
|
*
|
||||||
|
* {{notes}}
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void {{operationId}}Test() {
|
||||||
|
{{#allParams}}
|
||||||
|
{{{dataType}}} {{paramName}} = null;
|
||||||
|
{{/allParams}}
|
||||||
|
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
{{/operation}}{{/operations}}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private final FakeApi api = new FakeApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() throws ApiException {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
Date date = null;
|
||||||
|
Date dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,155 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private final PetApi api = new PetApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() throws ApiException {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() throws ApiException {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private final StoreApi api = new StoreApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() throws ApiException {
|
||||||
|
String orderId = null;
|
||||||
|
// api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() throws ApiException {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() throws ApiException {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() throws ApiException {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,149 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private final UserApi api = new UserApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() throws ApiException {
|
||||||
|
User body = null;
|
||||||
|
// api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() throws ApiException {
|
||||||
|
// api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private FakeApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().buildClient(FakeApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
Date date = null;
|
||||||
|
Date dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private PetApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().buildClient(PetApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private StoreApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().buildClient(StoreApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() {
|
||||||
|
String orderId = null;
|
||||||
|
// api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,131 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private UserApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().buildClient(UserApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() {
|
||||||
|
User body = null;
|
||||||
|
// api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() {
|
||||||
|
String username = null;
|
||||||
|
// api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() {
|
||||||
|
// api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private final FakeApi api = new FakeApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() throws ApiException {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
Date date = null;
|
||||||
|
Date dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,155 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private final PetApi api = new PetApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() throws ApiException {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() throws ApiException {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private final StoreApi api = new StoreApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() throws ApiException {
|
||||||
|
String orderId = null;
|
||||||
|
// api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() throws ApiException {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() throws ApiException {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() throws ApiException {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,149 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private final UserApi api = new UserApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() throws ApiException {
|
||||||
|
User body = null;
|
||||||
|
// api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() throws ApiException {
|
||||||
|
// api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private final FakeApi api = new FakeApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() throws ApiException {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
Date date = null;
|
||||||
|
Date dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,155 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private final PetApi api = new PetApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() throws ApiException {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() throws ApiException {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private final StoreApi api = new StoreApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() throws ApiException {
|
||||||
|
String orderId = null;
|
||||||
|
// api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() throws ApiException {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() throws ApiException {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() throws ApiException {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,149 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private final UserApi api = new UserApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() throws ApiException {
|
||||||
|
User body = null;
|
||||||
|
// api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() throws ApiException {
|
||||||
|
// api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private FakeApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(FakeApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
Date date = null;
|
||||||
|
Date dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// Void response = api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private PetApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(PetApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// Void response = api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// Void response = api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// Void response = api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// Void response = api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private StoreApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(StoreApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() {
|
||||||
|
String orderId = null;
|
||||||
|
// Void response = api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,131 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private UserApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(UserApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() {
|
||||||
|
User body = null;
|
||||||
|
// Void response = api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// Void response = api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// Void response = api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() {
|
||||||
|
String username = null;
|
||||||
|
// Void response = api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() {
|
||||||
|
// Void response = api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// Void response = api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private FakeApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(FakeApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
Date date = null;
|
||||||
|
Date dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// Void response = api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private PetApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(PetApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// Void response = api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// Void response = api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// Void response = api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// Void response = api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private StoreApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(StoreApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() {
|
||||||
|
String orderId = null;
|
||||||
|
// Void response = api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,131 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private UserApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(UserApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() {
|
||||||
|
User body = null;
|
||||||
|
// Void response = api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// Void response = api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// Void response = api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() {
|
||||||
|
String username = null;
|
||||||
|
// Void response = api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() {
|
||||||
|
// Void response = api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// Void response = api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private FakeApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(FakeApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
Date date = null;
|
||||||
|
Date dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// Void response = api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private PetApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(PetApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// Void response = api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// Void response = api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() {
|
||||||
|
Pet body = null;
|
||||||
|
// Void response = api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// Void response = api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private StoreApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(StoreApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() {
|
||||||
|
String orderId = null;
|
||||||
|
// Void response = api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,131 @@
|
|||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiClient;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private UserApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(UserApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() {
|
||||||
|
User body = null;
|
||||||
|
// Void response = api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// Void response = api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() {
|
||||||
|
List<User> body = null;
|
||||||
|
// Void response = api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() {
|
||||||
|
String username = null;
|
||||||
|
// Void response = api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() {
|
||||||
|
// Void response = api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// Void response = api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user