This commit is contained in:
Andrew 2023-04-24 10:46:16 +07:00
commit f076ae3790
82 changed files with 7250 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for AccessTokenResponse
void main() {
final instance = AccessTokenResponseBuilder();
// TODO add properties to the builder and call build()
group(AccessTokenResponse, () {
// String accessToken
test('to test the property `accessToken`', () async {
// TODO
});
});
}

21
test/auth_model_test.dart Normal file
View file

@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for AuthModel
void main() {
final instance = AuthModelBuilder();
// TODO add properties to the builder and call build()
group(AuthModel, () {
// String username
test('to test the property `username`', () async {
// TODO
});
// String password
test('to test the property `password`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for BodyUpdateItemInTableItemsTableNamePost
void main() {
final instance = BodyUpdateItemInTableItemsTableNamePostBuilder();
// TODO add properties to the builder and call build()
group(BodyUpdateItemInTableItemsTableNamePost, () {
// BuiltMap<String, String> item
test('to test the property `item`', () async {
// TODO
});
// BuiltMap<String, String> oldItem
test('to test the property `oldItem`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,26 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for ColumnConditionCompat
void main() {
final instance = ColumnConditionCompatBuilder();
// TODO add properties to the builder and call build()
group(ColumnConditionCompat, () {
// String column
test('to test the property `column`', () async {
// TODO
});
// String operator_
test('to test the property `operator_`', () async {
// TODO
});
// JsonObject value
test('to test the property `value`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for CreateAssetResponse
void main() {
final instance = CreateAssetResponseBuilder();
// TODO add properties to the builder and call build()
group(CreateAssetResponse, () {
// bool ok (default value: true)
test('to test the property `ok`', () async {
// TODO
});
// String fid
test('to test the property `fid`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for CreateUserDefinition
void main() {
final instance = CreateUserDefinitionBuilder();
// TODO add properties to the builder and call build()
group(CreateUserDefinition, () {
// String username
test('to test the property `username`', () async {
// TODO
});
// String password
test('to test the property `password`', () async {
// TODO
});
});
}

118
test/default_api_test.dart Normal file
View file

@ -0,0 +1,118 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
/// tests for DefaultApi
void main() {
final instance = TuuliApi().getDefaultApi();
group(DefaultApi, () {
// Create Item
//
//Future<OkResponse> createItemItemsTableNamePost(String tableName, JsonObject body, { String accessToken }) async
test('test createItemItemsTableNamePost', () async {
// TODO
});
// Create Table
//
// Parameter `columns` should be a list of strings Each string should be in a following format: `column_name:column_type[:column_options]` Where *column_type* should be one of the following: - serial - str - bool - datetime - float - int - int:asset - int:user Also *column_options* can be one of the following: - unique - default Example: ```json [ \"id:serial:primary\", \"name:str:unique\", \"description:str\", \"is_active:bool\", \"price:float\", \"quantity:int\", \"creator_id:int:user\", \"asset_id:int:asset\" ] ``` Notes: 1. you cannot use *unique* and *default* at the same time 2. in current implementation you cannot use *default*, because there is no way to specify default value
//
//Future<OkResponse> createTableApiCreateTableTableNamePost(String tableName, BuiltList<String> requestBody, { String accessToken }) async
test('test createTableApiCreateTableTableNamePost', () async {
// TODO
});
// Create User
//
//Future<OkResponse> createUserApiUsersPost(CreateUserDefinition createUserDefinition, { String accessToken }) async
test('test createUserApiUsersPost', () async {
// TODO
});
// Delete Item From Table
//
//Future<OkResponse> deleteItemFromTableItemsTableNamePost(String tableName, BuiltList<ColumnConditionCompat> columnConditionCompat, { String accessToken }) async
test('test deleteItemFromTableItemsTableNamePost', () async {
// TODO
});
// Drop Table
//
//Future<OkResponse> dropTableApiDropTableTableNamePost(String tableName, { String accessToken }) async
test('test dropTableApiDropTableTableNamePost', () async {
// TODO
});
// Get Access Token
//
//Future<AccessTokenResponse> getAccessTokenApiGetAccessTokenPost(AuthModel authModel) async
test('test getAccessTokenApiGetAccessTokenPost', () async {
// TODO
});
// Get Asset
//
//Future<JsonObject> getAssetAssetsFidGet(String fid) async
test('test getAssetAssetsFidGet', () async {
// TODO
});
// Get Items From Table
//
//Future<TableItemsResponse> getItemsFromTableItemsTableNamePost(String tableName, ItemsFieldSelectorList itemsFieldSelectorList, { String accessToken }) async
test('test getItemsFromTableItemsTableNamePost', () async {
// TODO
});
// List Tables
//
//Future<BuiltList<TableDefinition>> listTablesApiListTablesGet({ String accessToken }) async
test('test listTablesApiListTablesGet', () async {
// TODO
});
// Put Asset
//
//Future<CreateAssetResponse> putAssetAssetsPost(MultipartFile asset, { String accessToken }) async
test('test putAssetAssetsPost', () async {
// TODO
});
// Remove Asset
//
//Future<OkResponse> removeAssetAssetsAssetIdPost(int assetId, { bool checkReferences, bool deleteReferencing, String accessToken }) async
test('test removeAssetAssetsAssetIdPost', () async {
// TODO
});
// Remove User
//
//Future<OkResponse> removeUserApiUsersPost(int userId, { String accessToken }) async
test('test removeUserApiUsersPost', () async {
// TODO
});
// Update Asset Description
//
//Future<OkResponse> updateAssetDescriptionAssetsAssetIdPost(int assetId, String assetDescription, { String accessToken }) async
test('test updateAssetDescriptionAssetsAssetIdPost', () async {
// TODO
});
// Update Item In Table
//
//Future<OkResponse> updateItemInTableItemsTableNamePost(String tableName, BodyUpdateItemInTableItemsTableNamePost bodyUpdateItemInTableItemsTableNamePost, { String accessToken }) async
test('test updateItemInTableItemsTableNamePost', () async {
// TODO
});
// Update User
//
//Future<OkResponse> updateUserApiUsersPost(UserUpdateDefinition userUpdateDefinition, { String accessToken }) async
test('test updateUserApiUsersPost', () async {
// TODO
});
});
}

View file

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for ErrorResponse
void main() {
final instance = ErrorResponseBuilder();
// TODO add properties to the builder and call build()
group(ErrorResponse, () {
// String error
test('to test the property `error`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for HTTPValidationError
void main() {
final instance = HTTPValidationErrorBuilder();
// TODO add properties to the builder and call build()
group(HTTPValidationError, () {
// BuiltList<ValidationError> detail
test('to test the property `detail`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for ItemsFieldSelectorList
void main() {
final instance = ItemsFieldSelectorListBuilder();
// TODO add properties to the builder and call build()
group(ItemsFieldSelectorList, () {
// BuiltList<String> fields (default value: ListBuilder())
test('to test the property `fields`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,11 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for LocationInner
void main() {
final instance = LocationInnerBuilder();
// TODO add properties to the builder and call build()
group(LocationInner, () {
});
}

View file

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for OkResponse
void main() {
final instance = OkResponseBuilder();
// TODO add properties to the builder and call build()
group(OkResponse, () {
// bool ok (default value: true)
test('to test the property `ok`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,36 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for TableDefinition
void main() {
final instance = TableDefinitionBuilder();
// TODO add properties to the builder and call build()
group(TableDefinition, () {
// String tableId
test('to test the property `tableId`', () async {
// TODO
});
// String tableName
test('to test the property `tableName`', () async {
// TODO
});
// String columns
test('to test the property `columns`', () async {
// TODO
});
// bool system
test('to test the property `system`', () async {
// TODO
});
// bool hidden
test('to test the property `hidden`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for TableItemsResponse
void main() {
final instance = TableItemsResponseBuilder();
// TODO add properties to the builder and call build()
group(TableItemsResponse, () {
// BuiltList<JsonObject> items
test('to test the property `items`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,26 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for UserUpdateDefinition
void main() {
final instance = UserUpdateDefinitionBuilder();
// TODO add properties to the builder and call build()
group(UserUpdateDefinition, () {
// int userId
test('to test the property `userId`', () async {
// TODO
});
// String password
test('to test the property `password`', () async {
// TODO
});
// String accessToken
test('to test the property `accessToken`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,26 @@
import 'package:test/test.dart';
import 'package:tuuli_api/tuuli_api.dart';
// tests for ValidationError
void main() {
final instance = ValidationErrorBuilder();
// TODO add properties to the builder and call build()
group(ValidationError, () {
// BuiltList<LocationInner> loc
test('to test the property `loc`', () async {
// TODO
});
// String msg
test('to test the property `msg`', () async {
// TODO
});
// String type
test('to test the property `type`', () async {
// TODO
});
});
}