Skip to content

Commit ff3f63d

Browse files
committed
Fix Kotlin tests
1 parent 9e40a1a commit ff3f63d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

samples/client/petstore/kotlin/src/test/kotlin/org/openapitools/client/PetApiTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class PetApiTest : ShouldSpec() {
2222
val pet = Pet(
2323
id = petId,
2424
name = "kotlin client test",
25-
photoUrls = arrayOf("http://test_kotlin_unit_test.com"),
25+
photoUrls = listOf("http://test_kotlin_unit_test.com"),
2626
category = Category(petId, "test kotlin category"),
27-
tags = arrayOf(Tag(petId, "test kotlin tag"))
27+
tags = listOf(Tag(petId, "test kotlin tag"))
2828
)
2929
api.addPet(pet)
3030

@@ -44,15 +44,15 @@ class PetApiTest : ShouldSpec() {
4444
}
4545

4646
should("find pet by status") {
47-
val result = api.findPetsByStatus(arrayOf("available"))
47+
val result = api.findPetsByStatus(listOf("available"))
4848

4949
result.size.shouldBeGreaterThan(0)
5050

5151
for(onePet in result) {
5252
onePet.status.shouldBe(Pet.Status.available)
5353
}
5454

55-
val result2 = api.findPetsByStatus(arrayOf("unknown_and_incorrect_status"))
55+
val result2 = api.findPetsByStatus(listOf("unknown_and_incorrect_status"))
5656

5757
result2.size.shouldBe(0)
5858

@@ -63,7 +63,7 @@ class PetApiTest : ShouldSpec() {
6363
id = petId,
6464
name = "kotlin client updatePet",
6565
status = Pet.Status.pending,
66-
photoUrls = arrayOf("http://test_kotlin_unit_test.com")
66+
photoUrls = listOf("http://test_kotlin_unit_test.com")
6767
)
6868
api.updatePet(pet)
6969

samples/client/petstore/kotlin/src/test/kotlin/org/openapitools/client/StoreApiTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class StoreApiTest : ShouldSpec() {
1818
val pet = Pet(
1919
id = petId,
2020
name = "kotlin client test",
21-
photoUrls = arrayOf("http://test_kotlin_unit_test.com")
21+
photoUrls = listOf("http://test_kotlin_unit_test.com")
2222
)
2323
petApi.addPet(pet)
2424

0 commit comments

Comments
 (0)