rename test files to conform to style guide (#2206)

This commit is contained in:
William Cheng
2019-02-21 16:49:28 +08:00
committed by GitHub
parent f61181725a
commit 90a6302a65
10 changed files with 65 additions and 65 deletions

View File

@@ -626,11 +626,11 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig {
@Override
public String toApiTestFilename(String name) {
return "test_" + toApiFilename(name);
return toApiFilename(name) + "_test";
}
@Override
public String toModelTestFilename(String name) {
return "test_" + toModelFilename(name);
return toModelFilename(name) + "_test";
}
}

View File

@@ -12,11 +12,11 @@ test_that("id", {
#expect_equal(model.instance$`id`, "EXPECTED_RESULT")
})
test_that("pet_id", {
# tests for the property `pet_id` (integer)
test_that("petId", {
# tests for the property `petId` (integer)
# uncomment below to test the property
#expect_equal(model.instance$`pet_id`, "EXPECTED_RESULT")
#expect_equal(model.instance$`petId`, "EXPECTED_RESULT")
})
test_that("quantity", {
@@ -26,11 +26,11 @@ test_that("quantity", {
#expect_equal(model.instance$`quantity`, "EXPECTED_RESULT")
})
test_that("ship_date", {
# tests for the property `ship_date` (character)
test_that("shipDate", {
# tests for the property `shipDate` (character)
# uncomment below to test the property
#expect_equal(model.instance$`ship_date`, "EXPECTED_RESULT")
#expect_equal(model.instance$`shipDate`, "EXPECTED_RESULT")
})
test_that("status", {

View File

@@ -7,9 +7,9 @@ api.instance <- PetApi$new()
test_that("AddPet", {
# tests for AddPet
# base path: http://petstore.swagger.io/v2
# Add a new pet to the store
# @param body Pet object that needs to be added to the store
# @param [Hash] opts the optional parameters
# @param Pet body Pet object that needs to be added to the store
# @return [Void]
# uncomment below to test the operation
@@ -18,10 +18,10 @@ test_that("AddPet", {
test_that("DeletePet", {
# tests for DeletePet
# base path: http://petstore.swagger.io/v2
# Deletes a pet
# @param pet.id Pet id to delete
# @param [Hash] opts the optional parameters
# @option opts [character] :api.key
# @param integer pet.id Pet id to delete
# @param character api.key (optional)
# @return [Void]
# uncomment below to test the operation
@@ -30,10 +30,10 @@ test_that("DeletePet", {
test_that("FindPetsByStatus", {
# tests for FindPetsByStatus
# base path: http://petstore.swagger.io/v2
# Finds Pets by status
# Multiple status values can be provided with comma separated strings
# @param status Status values that need to be considered for filter
# @param [Hash] opts the optional parameters
# @param character status Status values that need to be considered for filter
# @return [Pet]
# uncomment below to test the operation
@@ -42,10 +42,10 @@ test_that("FindPetsByStatus", {
test_that("FindPetsByTags", {
# tests for FindPetsByTags
# base path: http://petstore.swagger.io/v2
# Finds Pets by tags
# Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
# @param tags Tags to filter by
# @param [Hash] opts the optional parameters
# @param character tags Tags to filter by
# @return [Pet]
# uncomment below to test the operation
@@ -54,10 +54,10 @@ test_that("FindPetsByTags", {
test_that("GetPetById", {
# tests for GetPetById
# base path: http://petstore.swagger.io/v2
# Find pet by ID
# Returns a single pet
# @param pet.id ID of pet to return
# @param [Hash] opts the optional parameters
# @param integer pet.id ID of pet to return
# @return [Pet]
# uncomment below to test the operation
@@ -66,9 +66,9 @@ test_that("GetPetById", {
test_that("UpdatePet", {
# tests for UpdatePet
# base path: http://petstore.swagger.io/v2
# Update an existing pet
# @param body Pet object that needs to be added to the store
# @param [Hash] opts the optional parameters
# @param Pet body Pet object that needs to be added to the store
# @return [Void]
# uncomment below to test the operation
@@ -77,11 +77,11 @@ test_that("UpdatePet", {
test_that("UpdatePetWithForm", {
# tests for UpdatePetWithForm
# base path: http://petstore.swagger.io/v2
# Updates a pet in the store with form data
# @param pet.id ID of pet that needs to be updated
# @param [Hash] opts the optional parameters
# @option opts [character] :name Updated name of the pet
# @option opts [character] :status Updated status of the pet
# @param integer pet.id ID of pet that needs to be updated
# @param character name Updated name of the pet (optional)
# @param character status Updated status of the pet (optional)
# @return [Void]
# uncomment below to test the operation
@@ -90,11 +90,11 @@ test_that("UpdatePetWithForm", {
test_that("UploadFile", {
# tests for UploadFile
# base path: http://petstore.swagger.io/v2
# uploads an image
# @param pet.id ID of pet to update
# @param [Hash] opts the optional parameters
# @option opts [character] :additional.metadata Additional data to pass to server
# @option opts [data.frame] :file file to upload
# @param integer pet.id ID of pet to update
# @param character additional.metadata Additional data to pass to server (optional)
# @param data.frame file file to upload (optional)
# @return [ModelApiResponse]
# uncomment below to test the operation

View File

@@ -26,11 +26,11 @@ test_that("name", {
#expect_equal(model.instance$`name`, "EXPECTED_RESULT")
})
test_that("photo_urls", {
# tests for the property `photo_urls` (character)
test_that("photoUrls", {
# tests for the property `photoUrls` (character)
# uncomment below to test the property
#expect_equal(model.instance$`photo_urls`, "EXPECTED_RESULT")
#expect_equal(model.instance$`photoUrls`, "EXPECTED_RESULT")
})
test_that("tags", {

View File

@@ -7,10 +7,10 @@ api.instance <- StoreApi$new()
test_that("DeleteOrder", {
# tests for DeleteOrder
# base path: http://petstore.swagger.io/v2
# Delete purchase order by ID
# For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
# @param order.id ID of the order that needs to be deleted
# @param [Hash] opts the optional parameters
# @param character order.id ID of the order that needs to be deleted
# @return [Void]
# uncomment below to test the operation
@@ -19,9 +19,9 @@ test_that("DeleteOrder", {
test_that("GetInventory", {
# tests for GetInventory
# base path: http://petstore.swagger.io/v2
# Returns pet inventories by status
# Returns a map of status codes to quantities
# @param [Hash] opts the optional parameters
# @return [integer]
# uncomment below to test the operation
@@ -30,10 +30,10 @@ test_that("GetInventory", {
test_that("GetOrderById", {
# tests for GetOrderById
# base path: http://petstore.swagger.io/v2
# Find purchase order by ID
# For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
# @param order.id ID of pet that needs to be fetched
# @param [Hash] opts the optional parameters
# @param integer order.id ID of pet that needs to be fetched
# @return [Order]
# uncomment below to test the operation
@@ -42,9 +42,9 @@ test_that("GetOrderById", {
test_that("PlaceOrder", {
# tests for PlaceOrder
# base path: http://petstore.swagger.io/v2
# Place an order for a pet
# @param body order placed for purchasing the pet
# @param [Hash] opts the optional parameters
# @param Order body order placed for purchasing the pet
# @return [Order]
# uncomment below to test the operation

View File

@@ -7,10 +7,10 @@ api.instance <- UserApi$new()
test_that("CreateUser", {
# tests for CreateUser
# base path: http://petstore.swagger.io/v2
# Create user
# This can only be done by the logged in user.
# @param body Created user object
# @param [Hash] opts the optional parameters
# @param User body Created user object
# @return [Void]
# uncomment below to test the operation
@@ -19,9 +19,9 @@ test_that("CreateUser", {
test_that("CreateUsersWithArrayInput", {
# tests for CreateUsersWithArrayInput
# base path: http://petstore.swagger.io/v2
# Creates list of users with given input array
# @param body List of user object
# @param [Hash] opts the optional parameters
# @param User body List of user object
# @return [Void]
# uncomment below to test the operation
@@ -30,9 +30,9 @@ test_that("CreateUsersWithArrayInput", {
test_that("CreateUsersWithListInput", {
# tests for CreateUsersWithListInput
# base path: http://petstore.swagger.io/v2
# Creates list of users with given input array
# @param body List of user object
# @param [Hash] opts the optional parameters
# @param User body List of user object
# @return [Void]
# uncomment below to test the operation
@@ -41,10 +41,10 @@ test_that("CreateUsersWithListInput", {
test_that("DeleteUser", {
# tests for DeleteUser
# base path: http://petstore.swagger.io/v2
# Delete user
# This can only be done by the logged in user.
# @param username The name that needs to be deleted
# @param [Hash] opts the optional parameters
# @param character username The name that needs to be deleted
# @return [Void]
# uncomment below to test the operation
@@ -53,9 +53,9 @@ test_that("DeleteUser", {
test_that("GetUserByName", {
# tests for GetUserByName
# base path: http://petstore.swagger.io/v2
# Get user by user name
# @param username The name that needs to be fetched. Use user1 for testing.
# @param [Hash] opts the optional parameters
# @param character username The name that needs to be fetched. Use user1 for testing.
# @return [User]
# uncomment below to test the operation
@@ -64,10 +64,10 @@ test_that("GetUserByName", {
test_that("LoginUser", {
# tests for LoginUser
# base path: http://petstore.swagger.io/v2
# Logs user into the system
# @param username The user name for login
# @param password The password for login in clear text
# @param [Hash] opts the optional parameters
# @param character username The user name for login
# @param character password The password for login in clear text
# @return [character]
# uncomment below to test the operation
@@ -76,8 +76,8 @@ test_that("LoginUser", {
test_that("LogoutUser", {
# tests for LogoutUser
# base path: http://petstore.swagger.io/v2
# Logs out current logged in user session
# @param [Hash] opts the optional parameters
# @return [Void]
# uncomment below to test the operation
@@ -86,11 +86,11 @@ test_that("LogoutUser", {
test_that("UpdateUser", {
# tests for UpdateUser
# base path: http://petstore.swagger.io/v2
# Updated user
# This can only be done by the logged in user.
# @param username name that need to be deleted
# @param body Updated user object
# @param [Hash] opts the optional parameters
# @param character username name that need to be deleted
# @param User body Updated user object
# @return [Void]
# uncomment below to test the operation

View File

@@ -19,18 +19,18 @@ test_that("username", {
#expect_equal(model.instance$`username`, "EXPECTED_RESULT")
})
test_that("first_name", {
# tests for the property `first_name` (character)
test_that("firstName", {
# tests for the property `firstName` (character)
# uncomment below to test the property
#expect_equal(model.instance$`first_name`, "EXPECTED_RESULT")
#expect_equal(model.instance$`firstName`, "EXPECTED_RESULT")
})
test_that("last_name", {
# tests for the property `last_name` (character)
test_that("lastName", {
# tests for the property `lastName` (character)
# uncomment below to test the property
#expect_equal(model.instance$`last_name`, "EXPECTED_RESULT")
#expect_equal(model.instance$`lastName`, "EXPECTED_RESULT")
})
test_that("email", {
@@ -54,11 +54,11 @@ test_that("phone", {
#expect_equal(model.instance$`phone`, "EXPECTED_RESULT")
})
test_that("user_status", {
# tests for the property `user_status` (integer)
test_that("userStatus", {
# tests for the property `userStatus` (integer)
# User Status
# uncomment below to test the property
#expect_equal(model.instance$`user_status`, "EXPECTED_RESULT")
#expect_equal(model.instance$`userStatus`, "EXPECTED_RESULT")
})