Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import aws.sdk.kotlin.runtime.testing.ManualDispatchTestBase
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.launch
import kotlinx.coroutines.yield
import org.junit.jupiter.api.Test
import java.nio.ByteBuffer
import kotlin.test.AfterTest
import kotlin.test.Test
import kotlin.test.assertEquals

class BufferedReadChannelByteBufferTest : ManualDispatchTestBase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package aws.sdk.kotlin.runtime.regions.providers

import aws.sdk.kotlin.runtime.AwsSdkSetting
import aws.sdk.kotlin.runtime.testing.runSuspendTest
import org.junit.jupiter.api.Test
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNull

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package aws.sdk.kotlin.codegen

import aws.sdk.kotlin.codegen.model.traits.Presignable
import org.junit.jupiter.api.Test
import software.amazon.smithy.build.MockManifest
import software.amazon.smithy.codegen.core.SymbolProvider
import software.amazon.smithy.kotlin.codegen.KotlinSettings
Expand All @@ -14,6 +13,7 @@ import software.amazon.smithy.kotlin.codegen.test.shouldContainOnlyOnceWithDiff
import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
import software.amazon.smithy.model.Model
import software.amazon.smithy.model.shapes.OperationShape
import kotlin.test.Test
import kotlin.test.assertTrue

class PresignerGeneratorTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package aws.sdk.kotlin.codegen.customization

import org.junit.jupiter.api.Test
import software.amazon.smithy.kotlin.codegen.model.expectShape
import software.amazon.smithy.kotlin.codegen.model.hasTrait
import software.amazon.smithy.kotlin.codegen.model.isNumberShape
Expand All @@ -14,6 +13,7 @@ import software.amazon.smithy.kotlin.codegen.test.prependNamespaceAndService
import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
import software.amazon.smithy.model.shapes.StructureShape
import software.amazon.smithy.model.traits.BoxTrait
import kotlin.test.Test
import kotlin.test.assertFalse
import kotlin.test.assertTrue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package aws.sdk.kotlin.codegen.customization

import aws.sdk.kotlin.codegen.model.traits.Presignable
import org.junit.jupiter.api.Test
import software.amazon.smithy.kotlin.codegen.model.expectShape
import software.amazon.smithy.kotlin.codegen.test.newTestContext
import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
import software.amazon.smithy.model.shapes.OperationShape
import kotlin.test.Test
import kotlin.test.assertFalse
import kotlin.test.assertTrue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
package aws.sdk.kotlin.codegen.customization

import io.kotest.matchers.shouldBe
import org.junit.jupiter.api.Test
import software.amazon.smithy.kotlin.codegen.test.newTestContext
import software.amazon.smithy.kotlin.codegen.test.prependNamespaceAndService
import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
import software.amazon.smithy.model.shapes.ShapeId
import kotlin.test.Test

class RemoveEventStreamOperationsTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
package aws.sdk.kotlin.codegen.protocols.core

import io.kotest.matchers.string.shouldContainOnlyOnce
import org.junit.jupiter.api.Test
import software.amazon.smithy.build.MockManifest
import software.amazon.smithy.kotlin.codegen.test.newTestContext
import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
import software.amazon.smithy.model.node.Node
import kotlin.test.Test

class EndpointResolverGeneratorTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

package aws.sdk.kotlin.codegen.protocols.json

import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import software.amazon.smithy.kotlin.codegen.model.expectShape
import software.amazon.smithy.kotlin.codegen.test.newTestContext
import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
import software.amazon.smithy.model.knowledge.HttpBinding
import software.amazon.smithy.model.shapes.OperationShape
import software.amazon.smithy.model.shapes.StructureShape
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertTrue

class AwsJsonHttpBindingResolverTest {
private val testModel = """
Expand Down Expand Up @@ -54,7 +55,7 @@ class AwsJsonHttpBindingResolverTest {
val expectedOperations = listOf("GetEmptyFoo", "GetFoo")
val actualOperations = unit.bindingOperations().map { operationShape -> operationShape.id.name }.sorted()

Assertions.assertEquals(expectedOperations, actualOperations)
assertEquals(expectedOperations, actualOperations)
}

@Test
Expand All @@ -65,7 +66,7 @@ class AwsJsonHttpBindingResolverTest {

val actualRequestBindings = unit.requestBindings(operation)

Assertions.assertTrue(actualRequestBindings.isEmpty())
assertTrue(actualRequestBindings.isEmpty())
}

@Test
Expand All @@ -76,13 +77,13 @@ class AwsJsonHttpBindingResolverTest {

val actualRequestBindings = unit.requestBindings(operation)

Assertions.assertTrue(actualRequestBindings.size == 1)
assertTrue(actualRequestBindings.size == 1)
val binding = actualRequestBindings.first()

Assertions.assertEquals(binding.member.id.toString(), "smithy.example#GetFooInput\$bigInt")
Assertions.assertEquals(binding.location, HttpBinding.Location.DOCUMENT)
assertEquals(binding.member.id.toString(), "smithy.example#GetFooInput\$bigInt")
assertEquals(binding.location, HttpBinding.Location.DOCUMENT)
// Location name is unused by awsJson
Assertions.assertEquals(binding.locationName, null)
assertEquals(binding.locationName, null)
}

@Test
Expand All @@ -93,7 +94,7 @@ class AwsJsonHttpBindingResolverTest {

val actualResponseBindings = unit.responseBindings(operation)

Assertions.assertTrue(actualResponseBindings.isEmpty())
assertTrue(actualResponseBindings.isEmpty())
}

@Test
Expand All @@ -104,13 +105,13 @@ class AwsJsonHttpBindingResolverTest {

val actualResponseBindings = unit.responseBindings(operation)

Assertions.assertTrue(actualResponseBindings.size == 1)
assertTrue(actualResponseBindings.size == 1)
val binding = actualResponseBindings.first()

Assertions.assertEquals(binding.member.id.toString(), "smithy.example#GetFooOutput\$bigInt")
Assertions.assertEquals(binding.location, HttpBinding.Location.DOCUMENT)
assertEquals(binding.member.id.toString(), "smithy.example#GetFooOutput\$bigInt")
assertEquals(binding.location, HttpBinding.Location.DOCUMENT)
// Location name is unused by awsJson
Assertions.assertEquals(binding.locationName, null)
assertEquals(binding.locationName, null)
}

@Test
Expand All @@ -121,7 +122,7 @@ class AwsJsonHttpBindingResolverTest {

val actualResponseBindings = unit.responseBindings(structure)

Assertions.assertTrue(actualResponseBindings.isEmpty())
assertTrue(actualResponseBindings.isEmpty())
}

@Test
Expand All @@ -132,12 +133,12 @@ class AwsJsonHttpBindingResolverTest {

val actualResponseBindings = unit.responseBindings(structure)

Assertions.assertTrue(actualResponseBindings.size == 1)
assertTrue(actualResponseBindings.size == 1)
val binding = actualResponseBindings.first()

Assertions.assertEquals(binding.member.id.toString(), "smithy.example#GetFooOutput\$bigInt")
Assertions.assertEquals(binding.location, HttpBinding.Location.DOCUMENT)
assertEquals(binding.member.id.toString(), "smithy.example#GetFooOutput\$bigInt")
assertEquals(binding.location, HttpBinding.Location.DOCUMENT)
// Location name is unused by awsJson
Assertions.assertEquals(binding.locationName, null)
assertEquals(binding.locationName, null)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

package aws.sdk.kotlin.codegen.protocols.xml

import org.junit.jupiter.api.Test
import software.amazon.smithy.kotlin.codegen.test.*
import software.amazon.smithy.model.shapes.ShapeId
import kotlin.test.Test

class RestXmlSerdeDescriptorGeneratorTest {
private fun render(modelSnippet: String): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import aws.sdk.kotlin.services.polly.model.OutputFormat
import aws.sdk.kotlin.services.polly.model.SynthesizeSpeechRequest
import aws.sdk.kotlin.services.polly.model.VoiceId
import aws.smithy.kotlin.runtime.http.HttpMethod
import org.junit.jupiter.api.Test
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertTrue

Expand Down