Add auto-generated tests and travis config to Dart clients (#2909)

* add auto-generated tests and travis config for dart

* improve tests

* fix tests
This commit is contained in:
William Cheng 2019-05-25 22:52:30 +08:00 committed by GitHub
parent d243a6b96d
commit dfda6655ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
84 changed files with 2666 additions and 9 deletions

1
.gitignore vendored
View File

@ -218,6 +218,7 @@ samples/server/petstore/erlang-server/rebar.lock
samples/client/petstore/dart/petstore/packages
samples/client/petstore/dart/flutter_petstore/test/packages
samples/client/petstore/dart/petstore/test/packages
**/.dart_tool
# JS
samples/client/petstore/javascript/package-lock.json

View File

@ -49,6 +49,8 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String sourceFolder = "";
protected String apiDocPath = "docs" + File.separator;
protected String modelDocPath = "docs" + File.separator;
protected String apiTestPath = "test" + File.separator;
protected String modelTestPath = "test" + File.separator;
public DartClientCodegen() {
super();
@ -66,6 +68,9 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
modelDocTemplateFiles.put("object_doc.mustache", ".md");
apiDocTemplateFiles.put("api_doc.mustache", ".md");
modelTestTemplateFiles.put("model_test.mustache", ".dart");
apiTestTemplateFiles.put("api_test.mustache", ".dart");
setReservedWordsLowerCase(
Arrays.asList(
"abstract", "as", "assert", "async", "async*", "await",
@ -214,6 +219,7 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
}
@Override
@ -231,6 +237,16 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
}
@Override
public String apiTestFileFolder() {
return outputFolder + File.separator + apiTestPath.replace('/', File.separatorChar);
}
@Override
public String modelTestFileFolder() {
return outputFolder + File.separator + modelTestPath.replace('/', File.separatorChar);
}
@Override
public String apiDocFileFolder() {
return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar);
@ -295,6 +311,16 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {
return underscore(toApiName(name));
}
@Override
public String toApiTestFilename(String name) {
return toApiFilename(name) + "_test";
}
@Override
public String toModelTestFilename(String name) {
return toModelFilename(name) + "_test";
}
@Override
public String toDefaultValue(Schema schema) {
if (ModelUtils.isMapSchema(schema)) {

View File

@ -0,0 +1,28 @@
import 'package:{{pubName}}/api.dart';
import 'package:test/test.dart';
{{#operations}}
/// tests for {{classname}}
void main() {
var instance = new {{classname}}();
group('tests for {{classname}}', () {
{{#operation}}
{{#summary}}
// {{{.}}}
//
{{/summary}}
{{#notes}}
// {{{.}}}
//
{{/notes}}
//{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{operationId}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async
test('test {{operationId}}', () async {
// TODO
});
{{/operation}}
});
}
{{/operations}}

View File

@ -0,0 +1,26 @@
{{#models}}
{{#model}}
import 'package:{{pubName}}/api.dart';
import 'package:test/test.dart';
// tests for {{classname}}
void main() {
var instance = new Pet();
group('test {{classname}}', () {
{{#vars}}
{{#description}}
// {{{description}}}
{{/description}}
// {{{dataType}}} {{name}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
test('to test the property `{{name}}`', () async {
// TODO
});
{{/vars}}
});
}
{{/model}}
{{/models}}

View File

@ -3,3 +3,5 @@ version: {{pubVersion}}
description: {{pubDescription}}
dependencies:
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "1.24.3"
install:
- pub get
script:
- pub run test

View File

@ -0,0 +1,28 @@
import 'package:{{pubName}}/api.dart';
import 'package:test/test.dart';
{{#operations}}
/// tests for {{classname}}
void main() {
var instance = new {{classname}}();
group('tests for {{classname}}', () {
{{#operation}}
{{#summary}}
// {{{.}}}
//
{{/summary}}
{{#notes}}
// {{{.}}}
//
{{/notes}}
//{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{operationId}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async
test('test {{operationId}}', () async {
// TODO
});
{{/operation}}
});
}
{{/operations}}

View File

@ -0,0 +1,26 @@
{{#models}}
{{#model}}
import 'package:{{pubName}}/api.dart';
import 'package:test/test.dart';
// tests for {{classname}}
void main() {
var instance = new Pet();
group('test {{classname}}', () {
{{#vars}}
{{#description}}
// {{{description}}}
{{/description}}
// {{{dataType}}} {{name}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
test('to test the property `{{name}}`', () async {
// TODO
});
{{/vars}}
});
}
{{/model}}
{{/models}}

View File

@ -5,3 +5,5 @@ environment:
sdk: '>=2.0.0 <3.0.0'
dependencies:
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "2.2.0"
install:
- pub get
script:
- pub run test

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "1.24.3"
install:
- pub get
script:
- pub run test

View File

@ -3,3 +3,5 @@ version: 1.0.0
description: OpenAPI API client
dependencies:
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,27 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for ApiResponse
void main() {
var instance = new Pet();
group('test ApiResponse', () {
// int code (default value: null)
test('to test the property `code`', () async {
// TODO
});
// String type (default value: null)
test('to test the property `type`', () async {
// TODO
});
// String message (default value: null)
test('to test the property `message`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Category
void main() {
var instance = new Pet();
group('test Category', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Order
void main() {
var instance = new Pet();
group('test Order', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// int petId (default value: null)
test('to test the property `petId`', () async {
// TODO
});
// int quantity (default value: null)
test('to test the property `quantity`', () async {
// TODO
});
// DateTime shipDate (default value: null)
test('to test the property `shipDate`', () async {
// TODO
});
// Order Status
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
// bool complete (default value: false)
test('to test the property `complete`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for PetApi
void main() {
var instance = new PetApi();
group('tests for PetApi', () {
// Add a new pet to the store
//
//Future addPet(Pet body) async
test('test addPet', () async {
// TODO
});
// Deletes a pet
//
//Future deletePet(int petId, { String apiKey }) async
test('test deletePet', () async {
// TODO
});
// Finds Pets by status
//
// Multiple status values can be provided with comma separated strings
//
//Future<List<Pet>> findPetsByStatus(List<String> status) async
test('test findPetsByStatus', () async {
// TODO
});
// Finds Pets by tags
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
//Future<List<Pet>> findPetsByTags(List<String> tags) async
test('test findPetsByTags', () async {
// TODO
});
// Find pet by ID
//
// Returns a single pet
//
//Future<Pet> getPetById(int petId) async
test('test getPetById', () async {
// TODO
});
// Update an existing pet
//
//Future updatePet(Pet body) async
test('test updatePet', () async {
// TODO
});
// Updates a pet in the store with form data
//
//Future updatePetWithForm(int petId, { String name, String status }) async
test('test updatePetWithForm', () async {
// TODO
});
// uploads an image
//
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
test('test uploadFile', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Pet
void main() {
var instance = new Pet();
group('test Pet', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// Category category (default value: null)
test('to test the property `category`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
// List<String> photoUrls (default value: [])
test('to test the property `photoUrls`', () async {
// TODO
});
// List<Tag> tags (default value: [])
test('to test the property `tags`', () async {
// TODO
});
// pet status in the store
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,45 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for StoreApi
void main() {
var instance = new StoreApi();
group('tests for StoreApi', () {
// Delete purchase order by ID
//
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
//
//Future deleteOrder(String orderId) async
test('test deleteOrder', () async {
// TODO
});
// Returns pet inventories by status
//
// Returns a map of status codes to quantities
//
//Future<Map<String, int>> getInventory() async
test('test getInventory', () async {
// TODO
});
// Find purchase order by ID
//
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
//
//Future<Order> getOrderById(int orderId) async
test('test getOrderById', () async {
// TODO
});
// Place an order for a pet
//
//Future<Order> placeOrder(Order body) async
test('test placeOrder', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Tag
void main() {
var instance = new Pet();
group('test Tag', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for UserApi
void main() {
var instance = new UserApi();
group('tests for UserApi', () {
// Create user
//
// This can only be done by the logged in user.
//
//Future createUser(User body) async
test('test createUser', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithArrayInput(List<User> body) async
test('test createUsersWithArrayInput', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithListInput(List<User> body) async
test('test createUsersWithListInput', () async {
// TODO
});
// Delete user
//
// This can only be done by the logged in user.
//
//Future deleteUser(String username) async
test('test deleteUser', () async {
// TODO
});
// Get user by user name
//
//Future<User> getUserByName(String username) async
test('test getUserByName', () async {
// TODO
});
// Logs user into the system
//
//Future<String> loginUser(String username, String password) async
test('test loginUser', () async {
// TODO
});
// Logs out current logged in user session
//
//Future logoutUser() async
test('test logoutUser', () async {
// TODO
});
// Updated user
//
// This can only be done by the logged in user.
//
//Future updateUser(String username, User body) async
test('test updateUser', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for User
void main() {
var instance = new Pet();
group('test User', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String username (default value: null)
test('to test the property `username`', () async {
// TODO
});
// String firstName (default value: null)
test('to test the property `firstName`', () async {
// TODO
});
// String lastName (default value: null)
test('to test the property `lastName`', () async {
// TODO
});
// String email (default value: null)
test('to test the property `email`', () async {
// TODO
});
// String password (default value: null)
test('to test the property `password`', () async {
// TODO
});
// String phone (default value: null)
test('to test the property `phone`', () async {
// TODO
});
// User Status
// int userStatus (default value: null)
test('to test the property `userStatus`', () async {
// TODO
});
});
}

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "1.24.3"
install:
- pub get
script:
- pub run test

View File

@ -3,3 +3,5 @@ version: 1.0.0
description: OpenAPI API client
dependencies:
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,27 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for ApiResponse
void main() {
var instance = new Pet();
group('test ApiResponse', () {
// int code (default value: null)
test('to test the property `code`', () async {
// TODO
});
// String type (default value: null)
test('to test the property `type`', () async {
// TODO
});
// String message (default value: null)
test('to test the property `message`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Category
void main() {
var instance = new Pet();
group('test Category', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Order
void main() {
var instance = new Pet();
group('test Order', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// int petId (default value: null)
test('to test the property `petId`', () async {
// TODO
});
// int quantity (default value: null)
test('to test the property `quantity`', () async {
// TODO
});
// DateTime shipDate (default value: null)
test('to test the property `shipDate`', () async {
// TODO
});
// Order Status
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
// bool complete (default value: false)
test('to test the property `complete`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for PetApi
void main() {
var instance = new PetApi();
group('tests for PetApi', () {
// Add a new pet to the store
//
//Future addPet(Pet body) async
test('test addPet', () async {
// TODO
});
// Deletes a pet
//
//Future deletePet(int petId, { String apiKey }) async
test('test deletePet', () async {
// TODO
});
// Finds Pets by status
//
// Multiple status values can be provided with comma separated strings
//
//Future<List<Pet>> findPetsByStatus(List<String> status) async
test('test findPetsByStatus', () async {
// TODO
});
// Finds Pets by tags
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
//Future<List<Pet>> findPetsByTags(List<String> tags) async
test('test findPetsByTags', () async {
// TODO
});
// Find pet by ID
//
// Returns a single pet
//
//Future<Pet> getPetById(int petId) async
test('test getPetById', () async {
// TODO
});
// Update an existing pet
//
//Future updatePet(Pet body) async
test('test updatePet', () async {
// TODO
});
// Updates a pet in the store with form data
//
//Future updatePetWithForm(int petId, { String name, String status }) async
test('test updatePetWithForm', () async {
// TODO
});
// uploads an image
//
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
test('test uploadFile', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Pet
void main() {
var instance = new Pet();
group('test Pet', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// Category category (default value: null)
test('to test the property `category`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
// List<String> photoUrls (default value: [])
test('to test the property `photoUrls`', () async {
// TODO
});
// List<Tag> tags (default value: [])
test('to test the property `tags`', () async {
// TODO
});
// pet status in the store
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,45 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for StoreApi
void main() {
var instance = new StoreApi();
group('tests for StoreApi', () {
// Delete purchase order by ID
//
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
//
//Future deleteOrder(String orderId) async
test('test deleteOrder', () async {
// TODO
});
// Returns pet inventories by status
//
// Returns a map of status codes to quantities
//
//Future<Map<String, int>> getInventory() async
test('test getInventory', () async {
// TODO
});
// Find purchase order by ID
//
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
//
//Future<Order> getOrderById(int orderId) async
test('test getOrderById', () async {
// TODO
});
// Place an order for a pet
//
//Future<Order> placeOrder(Order body) async
test('test placeOrder', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Tag
void main() {
var instance = new Pet();
group('test Tag', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for UserApi
void main() {
var instance = new UserApi();
group('tests for UserApi', () {
// Create user
//
// This can only be done by the logged in user.
//
//Future createUser(User body) async
test('test createUser', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithArrayInput(List<User> body) async
test('test createUsersWithArrayInput', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithListInput(List<User> body) async
test('test createUsersWithListInput', () async {
// TODO
});
// Delete user
//
// This can only be done by the logged in user.
//
//Future deleteUser(String username) async
test('test deleteUser', () async {
// TODO
});
// Get user by user name
//
//Future<User> getUserByName(String username) async
test('test getUserByName', () async {
// TODO
});
// Logs user into the system
//
//Future<String> loginUser(String username, String password) async
test('test loginUser', () async {
// TODO
});
// Logs out current logged in user session
//
//Future logoutUser() async
test('test logoutUser', () async {
// TODO
});
// Updated user
//
// This can only be done by the logged in user.
//
//Future updateUser(String username, User body) async
test('test updateUser', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for User
void main() {
var instance = new Pet();
group('test User', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String username (default value: null)
test('to test the property `username`', () async {
// TODO
});
// String firstName (default value: null)
test('to test the property `firstName`', () async {
// TODO
});
// String lastName (default value: null)
test('to test the property `lastName`', () async {
// TODO
});
// String email (default value: null)
test('to test the property `email`', () async {
// TODO
});
// String password (default value: null)
test('to test the property `password`', () async {
// TODO
});
// String phone (default value: null)
test('to test the property `phone`', () async {
// TODO
});
// User Status
// int userStatus (default value: null)
test('to test the property `userStatus`', () async {
// TODO
});
});
}

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "1.24.3"
install:
- pub get
script:
- pub run test

View File

@ -3,3 +3,5 @@ version: 1.0.0
description: OpenAPI API client
dependencies:
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,27 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for ApiResponse
void main() {
var instance = new Pet();
group('test ApiResponse', () {
// int code (default value: null)
test('to test the property `code`', () async {
// TODO
});
// String type (default value: null)
test('to test the property `type`', () async {
// TODO
});
// String message (default value: null)
test('to test the property `message`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Category
void main() {
var instance = new Pet();
group('test Category', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Order
void main() {
var instance = new Pet();
group('test Order', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// int petId (default value: null)
test('to test the property `petId`', () async {
// TODO
});
// int quantity (default value: null)
test('to test the property `quantity`', () async {
// TODO
});
// DateTime shipDate (default value: null)
test('to test the property `shipDate`', () async {
// TODO
});
// Order Status
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
// bool complete (default value: false)
test('to test the property `complete`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for PetApi
void main() {
var instance = new PetApi();
group('tests for PetApi', () {
// Add a new pet to the store
//
//Future addPet(Pet body) async
test('test addPet', () async {
// TODO
});
// Deletes a pet
//
//Future deletePet(int petId, { String apiKey }) async
test('test deletePet', () async {
// TODO
});
// Finds Pets by status
//
// Multiple status values can be provided with comma separated strings
//
//Future<List<Pet>> findPetsByStatus(List<String> status) async
test('test findPetsByStatus', () async {
// TODO
});
// Finds Pets by tags
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
//Future<List<Pet>> findPetsByTags(List<String> tags) async
test('test findPetsByTags', () async {
// TODO
});
// Find pet by ID
//
// Returns a single pet
//
//Future<Pet> getPetById(int petId) async
test('test getPetById', () async {
// TODO
});
// Update an existing pet
//
//Future updatePet(Pet body) async
test('test updatePet', () async {
// TODO
});
// Updates a pet in the store with form data
//
//Future updatePetWithForm(int petId, { String name, String status }) async
test('test updatePetWithForm', () async {
// TODO
});
// uploads an image
//
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
test('test uploadFile', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Pet
void main() {
var instance = new Pet();
group('test Pet', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// Category category (default value: null)
test('to test the property `category`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
// List<String> photoUrls (default value: [])
test('to test the property `photoUrls`', () async {
// TODO
});
// List<Tag> tags (default value: [])
test('to test the property `tags`', () async {
// TODO
});
// pet status in the store
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,45 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for StoreApi
void main() {
var instance = new StoreApi();
group('tests for StoreApi', () {
// Delete purchase order by ID
//
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
//
//Future deleteOrder(String orderId) async
test('test deleteOrder', () async {
// TODO
});
// Returns pet inventories by status
//
// Returns a map of status codes to quantities
//
//Future<Map<String, int>> getInventory() async
test('test getInventory', () async {
// TODO
});
// Find purchase order by ID
//
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
//
//Future<Order> getOrderById(int orderId) async
test('test getOrderById', () async {
// TODO
});
// Place an order for a pet
//
//Future<Order> placeOrder(Order body) async
test('test placeOrder', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Tag
void main() {
var instance = new Pet();
group('test Tag', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for UserApi
void main() {
var instance = new UserApi();
group('tests for UserApi', () {
// Create user
//
// This can only be done by the logged in user.
//
//Future createUser(User body) async
test('test createUser', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithArrayInput(List<User> body) async
test('test createUsersWithArrayInput', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithListInput(List<User> body) async
test('test createUsersWithListInput', () async {
// TODO
});
// Delete user
//
// This can only be done by the logged in user.
//
//Future deleteUser(String username) async
test('test deleteUser', () async {
// TODO
});
// Get user by user name
//
//Future<User> getUserByName(String username) async
test('test getUserByName', () async {
// TODO
});
// Logs user into the system
//
//Future<String> loginUser(String username, String password) async
test('test loginUser', () async {
// TODO
});
// Logs out current logged in user session
//
//Future logoutUser() async
test('test logoutUser', () async {
// TODO
});
// Updated user
//
// This can only be done by the logged in user.
//
//Future updateUser(String username, User body) async
test('test updateUser', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for User
void main() {
var instance = new Pet();
group('test User', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String username (default value: null)
test('to test the property `username`', () async {
// TODO
});
// String firstName (default value: null)
test('to test the property `firstName`', () async {
// TODO
});
// String lastName (default value: null)
test('to test the property `lastName`', () async {
// TODO
});
// String email (default value: null)
test('to test the property `email`', () async {
// TODO
});
// String password (default value: null)
test('to test the property `password`', () async {
// TODO
});
// String phone (default value: null)
test('to test the property `phone`', () async {
// TODO
});
// User Status
// int userStatus (default value: null)
test('to test the property `userStatus`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,6 @@
#!/bin/sh
echo "purge test fils under 'test' folder"
rm -Rf flutter_petstore/openapi/test/
rm -Rf openapi/test/
rm -Rf openapi-browser-client/test

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "2.2.0"
install:
- pub get
script:
- pub run test

View File

@ -4,4 +4,6 @@ description: OpenAPI API client
environment:
sdk: '>=2.0.0 <3.0.0'
dependencies:
http: '>=0.11.1 <0.12.0'
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,27 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for ApiResponse
void main() {
var instance = new Pet();
group('test ApiResponse', () {
// int code (default value: null)
test('to test the property `code`', () async {
// TODO
});
// String type (default value: null)
test('to test the property `type`', () async {
// TODO
});
// String message (default value: null)
test('to test the property `message`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Category
void main() {
var instance = new Pet();
group('test Category', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Order
void main() {
var instance = new Pet();
group('test Order', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// int petId (default value: null)
test('to test the property `petId`', () async {
// TODO
});
// int quantity (default value: null)
test('to test the property `quantity`', () async {
// TODO
});
// DateTime shipDate (default value: null)
test('to test the property `shipDate`', () async {
// TODO
});
// Order Status
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
// bool complete (default value: false)
test('to test the property `complete`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for PetApi
void main() {
var instance = new PetApi();
group('tests for PetApi', () {
// Add a new pet to the store
//
//Future addPet(Pet body) async
test('test addPet', () async {
// TODO
});
// Deletes a pet
//
//Future deletePet(int petId, { String apiKey }) async
test('test deletePet', () async {
// TODO
});
// Finds Pets by status
//
// Multiple status values can be provided with comma separated strings
//
//Future<List<Pet>> findPetsByStatus(List<String> status) async
test('test findPetsByStatus', () async {
// TODO
});
// Finds Pets by tags
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
//Future<List<Pet>> findPetsByTags(List<String> tags) async
test('test findPetsByTags', () async {
// TODO
});
// Find pet by ID
//
// Returns a single pet
//
//Future<Pet> getPetById(int petId) async
test('test getPetById', () async {
// TODO
});
// Update an existing pet
//
//Future updatePet(Pet body) async
test('test updatePet', () async {
// TODO
});
// Updates a pet in the store with form data
//
//Future updatePetWithForm(int petId, { String name, String status }) async
test('test updatePetWithForm', () async {
// TODO
});
// uploads an image
//
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
test('test uploadFile', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Pet
void main() {
var instance = new Pet();
group('test Pet', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// Category category (default value: null)
test('to test the property `category`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
// List<String> photoUrls (default value: [])
test('to test the property `photoUrls`', () async {
// TODO
});
// List<Tag> tags (default value: [])
test('to test the property `tags`', () async {
// TODO
});
// pet status in the store
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,45 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for StoreApi
void main() {
var instance = new StoreApi();
group('tests for StoreApi', () {
// Delete purchase order by ID
//
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
//
//Future deleteOrder(String orderId) async
test('test deleteOrder', () async {
// TODO
});
// Returns pet inventories by status
//
// Returns a map of status codes to quantities
//
//Future<Map<String, int>> getInventory() async
test('test getInventory', () async {
// TODO
});
// Find purchase order by ID
//
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
//
//Future<Order> getOrderById(int orderId) async
test('test getOrderById', () async {
// TODO
});
// Place an order for a pet
//
//Future<Order> placeOrder(Order body) async
test('test placeOrder', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Tag
void main() {
var instance = new Pet();
group('test Tag', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for UserApi
void main() {
var instance = new UserApi();
group('tests for UserApi', () {
// Create user
//
// This can only be done by the logged in user.
//
//Future createUser(User body) async
test('test createUser', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithArrayInput(List<User> body) async
test('test createUsersWithArrayInput', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithListInput(List<User> body) async
test('test createUsersWithListInput', () async {
// TODO
});
// Delete user
//
// This can only be done by the logged in user.
//
//Future deleteUser(String username) async
test('test deleteUser', () async {
// TODO
});
// Get user by user name
//
//Future<User> getUserByName(String username) async
test('test getUserByName', () async {
// TODO
});
// Logs user into the system
//
//Future<String> loginUser(String username, String password) async
test('test loginUser', () async {
// TODO
});
// Logs out current logged in user session
//
//Future logoutUser() async
test('test logoutUser', () async {
// TODO
});
// Updated user
//
// This can only be done by the logged in user.
//
//Future updateUser(String username, User body) async
test('test updateUser', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for User
void main() {
var instance = new Pet();
group('test User', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String username (default value: null)
test('to test the property `username`', () async {
// TODO
});
// String firstName (default value: null)
test('to test the property `firstName`', () async {
// TODO
});
// String lastName (default value: null)
test('to test the property `lastName`', () async {
// TODO
});
// String email (default value: null)
test('to test the property `email`', () async {
// TODO
});
// String password (default value: null)
test('to test the property `password`', () async {
// TODO
});
// String phone (default value: null)
test('to test the property `phone`', () async {
// TODO
});
// User Status
// int userStatus (default value: null)
test('to test the property `userStatus`', () async {
// TODO
});
});
}

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "2.2.0"
install:
- pub get
script:
- pub run test

View File

@ -4,4 +4,6 @@ description: OpenAPI API client
environment:
sdk: '>=2.0.0 <3.0.0'
dependencies:
http: '>=0.11.1 <0.12.0'
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,27 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for ApiResponse
void main() {
var instance = new Pet();
group('test ApiResponse', () {
// int code (default value: null)
test('to test the property `code`', () async {
// TODO
});
// String type (default value: null)
test('to test the property `type`', () async {
// TODO
});
// String message (default value: null)
test('to test the property `message`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Category
void main() {
var instance = new Pet();
group('test Category', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Order
void main() {
var instance = new Pet();
group('test Order', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// int petId (default value: null)
test('to test the property `petId`', () async {
// TODO
});
// int quantity (default value: null)
test('to test the property `quantity`', () async {
// TODO
});
// DateTime shipDate (default value: null)
test('to test the property `shipDate`', () async {
// TODO
});
// Order Status
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
// bool complete (default value: false)
test('to test the property `complete`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for PetApi
void main() {
var instance = new PetApi();
group('tests for PetApi', () {
// Add a new pet to the store
//
//Future addPet(Pet body) async
test('test addPet', () async {
// TODO
});
// Deletes a pet
//
//Future deletePet(int petId, { String apiKey }) async
test('test deletePet', () async {
// TODO
});
// Finds Pets by status
//
// Multiple status values can be provided with comma separated strings
//
//Future<List<Pet>> findPetsByStatus(List<String> status) async
test('test findPetsByStatus', () async {
// TODO
});
// Finds Pets by tags
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
//Future<List<Pet>> findPetsByTags(List<String> tags) async
test('test findPetsByTags', () async {
// TODO
});
// Find pet by ID
//
// Returns a single pet
//
//Future<Pet> getPetById(int petId) async
test('test getPetById', () async {
// TODO
});
// Update an existing pet
//
//Future updatePet(Pet body) async
test('test updatePet', () async {
// TODO
});
// Updates a pet in the store with form data
//
//Future updatePetWithForm(int petId, { String name, String status }) async
test('test updatePetWithForm', () async {
// TODO
});
// uploads an image
//
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
test('test uploadFile', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Pet
void main() {
var instance = new Pet();
group('test Pet', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// Category category (default value: null)
test('to test the property `category`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
// List<String> photoUrls (default value: [])
test('to test the property `photoUrls`', () async {
// TODO
});
// List<Tag> tags (default value: [])
test('to test the property `tags`', () async {
// TODO
});
// pet status in the store
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,45 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for StoreApi
void main() {
var instance = new StoreApi();
group('tests for StoreApi', () {
// Delete purchase order by ID
//
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
//
//Future deleteOrder(String orderId) async
test('test deleteOrder', () async {
// TODO
});
// Returns pet inventories by status
//
// Returns a map of status codes to quantities
//
//Future<Map<String, int>> getInventory() async
test('test getInventory', () async {
// TODO
});
// Find purchase order by ID
//
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
//
//Future<Order> getOrderById(int orderId) async
test('test getOrderById', () async {
// TODO
});
// Place an order for a pet
//
//Future<Order> placeOrder(Order body) async
test('test placeOrder', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Tag
void main() {
var instance = new Pet();
group('test Tag', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for UserApi
void main() {
var instance = new UserApi();
group('tests for UserApi', () {
// Create user
//
// This can only be done by the logged in user.
//
//Future createUser(User body) async
test('test createUser', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithArrayInput(List<User> body) async
test('test createUsersWithArrayInput', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithListInput(List<User> body) async
test('test createUsersWithListInput', () async {
// TODO
});
// Delete user
//
// This can only be done by the logged in user.
//
//Future deleteUser(String username) async
test('test deleteUser', () async {
// TODO
});
// Get user by user name
//
//Future<User> getUserByName(String username) async
test('test getUserByName', () async {
// TODO
});
// Logs user into the system
//
//Future<String> loginUser(String username, String password) async
test('test loginUser', () async {
// TODO
});
// Logs out current logged in user session
//
//Future logoutUser() async
test('test logoutUser', () async {
// TODO
});
// Updated user
//
// This can only be done by the logged in user.
//
//Future updateUser(String username, User body) async
test('test updateUser', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for User
void main() {
var instance = new Pet();
group('test User', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String username (default value: null)
test('to test the property `username`', () async {
// TODO
});
// String firstName (default value: null)
test('to test the property `firstName`', () async {
// TODO
});
// String lastName (default value: null)
test('to test the property `lastName`', () async {
// TODO
});
// String email (default value: null)
test('to test the property `email`', () async {
// TODO
});
// String password (default value: null)
test('to test the property `password`', () async {
// TODO
});
// String phone (default value: null)
test('to test the property `phone`', () async {
// TODO
});
// User Status
// int userStatus (default value: null)
test('to test the property `userStatus`', () async {
// TODO
});
});
}

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -0,0 +1,11 @@
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "2.2.0"
install:
- pub get
script:
- pub run test

View File

@ -4,4 +4,6 @@ description: OpenAPI API client
environment:
sdk: '>=2.0.0 <3.0.0'
dependencies:
http: '>=0.11.1 <0.12.0'
http: '>=0.11.1 <0.13.0'
dev_dependencies:
test: ^1.3.0

View File

@ -0,0 +1,27 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for ApiResponse
void main() {
var instance = new Pet();
group('test ApiResponse', () {
// int code (default value: null)
test('to test the property `code`', () async {
// TODO
});
// String type (default value: null)
test('to test the property `type`', () async {
// TODO
});
// String message (default value: null)
test('to test the property `message`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Category
void main() {
var instance = new Pet();
group('test Category', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Order
void main() {
var instance = new Pet();
group('test Order', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// int petId (default value: null)
test('to test the property `petId`', () async {
// TODO
});
// int quantity (default value: null)
test('to test the property `quantity`', () async {
// TODO
});
// DateTime shipDate (default value: null)
test('to test the property `shipDate`', () async {
// TODO
});
// Order Status
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
// bool complete (default value: false)
test('to test the property `complete`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for PetApi
void main() {
var instance = new PetApi();
group('tests for PetApi', () {
// Add a new pet to the store
//
//Future addPet(Pet body) async
test('test addPet', () async {
// TODO
});
// Deletes a pet
//
//Future deletePet(int petId, { String apiKey }) async
test('test deletePet', () async {
// TODO
});
// Finds Pets by status
//
// Multiple status values can be provided with comma separated strings
//
//Future<List<Pet>> findPetsByStatus(List<String> status) async
test('test findPetsByStatus', () async {
// TODO
});
// Finds Pets by tags
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
//Future<List<Pet>> findPetsByTags(List<String> tags) async
test('test findPetsByTags', () async {
// TODO
});
// Find pet by ID
//
// Returns a single pet
//
//Future<Pet> getPetById(int petId) async
test('test getPetById', () async {
// TODO
});
// Update an existing pet
//
//Future updatePet(Pet body) async
test('test updatePet', () async {
// TODO
});
// Updates a pet in the store with form data
//
//Future updatePetWithForm(int petId, { String name, String status }) async
test('test updatePetWithForm', () async {
// TODO
});
// uploads an image
//
//Future<ApiResponse> uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
test('test uploadFile', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Pet
void main() {
var instance = new Pet();
group('test Pet', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// Category category (default value: null)
test('to test the property `category`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
// List<String> photoUrls (default value: [])
test('to test the property `photoUrls`', () async {
// TODO
});
// List<Tag> tags (default value: [])
test('to test the property `tags`', () async {
// TODO
});
// pet status in the store
// String status (default value: null)
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,45 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for StoreApi
void main() {
var instance = new StoreApi();
group('tests for StoreApi', () {
// Delete purchase order by ID
//
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
//
//Future deleteOrder(String orderId) async
test('test deleteOrder', () async {
// TODO
});
// Returns pet inventories by status
//
// Returns a map of status codes to quantities
//
//Future<Map<String, int>> getInventory() async
test('test getInventory', () async {
// TODO
});
// Find purchase order by ID
//
// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
//
//Future<Order> getOrderById(int orderId) async
test('test getOrderById', () async {
// TODO
});
// Place an order for a pet
//
//Future<Order> placeOrder(Order body) async
test('test placeOrder', () async {
// TODO
});
});
}

View File

@ -0,0 +1,22 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for Tag
void main() {
var instance = new Pet();
group('test Tag', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String name (default value: null)
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,73 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for UserApi
void main() {
var instance = new UserApi();
group('tests for UserApi', () {
// Create user
//
// This can only be done by the logged in user.
//
//Future createUser(User body) async
test('test createUser', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithArrayInput(List<User> body) async
test('test createUsersWithArrayInput', () async {
// TODO
});
// Creates list of users with given input array
//
//Future createUsersWithListInput(List<User> body) async
test('test createUsersWithListInput', () async {
// TODO
});
// Delete user
//
// This can only be done by the logged in user.
//
//Future deleteUser(String username) async
test('test deleteUser', () async {
// TODO
});
// Get user by user name
//
//Future<User> getUserByName(String username) async
test('test getUserByName', () async {
// TODO
});
// Logs user into the system
//
//Future<String> loginUser(String username, String password) async
test('test loginUser', () async {
// TODO
});
// Logs out current logged in user session
//
//Future logoutUser() async
test('test logoutUser', () async {
// TODO
});
// Updated user
//
// This can only be done by the logged in user.
//
//Future updateUser(String username, User body) async
test('test updateUser', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for User
void main() {
var instance = new Pet();
group('test User', () {
// int id (default value: null)
test('to test the property `id`', () async {
// TODO
});
// String username (default value: null)
test('to test the property `username`', () async {
// TODO
});
// String firstName (default value: null)
test('to test the property `firstName`', () async {
// TODO
});
// String lastName (default value: null)
test('to test the property `lastName`', () async {
// TODO
});
// String email (default value: null)
test('to test the property `email`', () async {
// TODO
});
// String password (default value: null)
test('to test the property `password`', () async {
// TODO
});
// String phone (default value: null)
test('to test the property `phone`', () async {
// TODO
});
// User Status
// int userStatus (default value: null)
test('to test the property `userStatus`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,6 @@
#!/bin/sh
echo "purge test fils under 'test' folder"
rm -Rf flutter_petstore/openapi/test/
rm -Rf openapi/test/
rm -Rf openapi-browser-client/test