Skip to content

Commit 89b3588

Browse files
author
David Hasani
committed
add test
1 parent 07ee424 commit 89b3588

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/CodeWhispererCodeModernizerGumbyClientTest.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class CodeWhispererCodeModernizerGumbyClientTest : CodeWhispererCodeModernizerTe
136136
}
137137

138138
@Test
139-
fun `check startCodeModernization`() {
139+
fun `check startCodeModernization on JAVA_17 target`() {
140140
val actual = gumbyClient.startCodeModernization("jobId", TransformationLanguage.JAVA_8, TransformationLanguage.JAVA_17)
141141
argumentCaptor<StartTransformationRequest>().apply {
142142
verify(bearerClient).startTransformation(capture())
@@ -146,6 +146,17 @@ class CodeWhispererCodeModernizerGumbyClientTest : CodeWhispererCodeModernizerTe
146146
}
147147
}
148148

149+
@Test
150+
fun `check startCodeModernization on JAVA_21 target`() {
151+
val actual = gumbyClient.startCodeModernization("jobId", TransformationLanguage.JAVA_8, TransformationLanguage.JAVA_21)
152+
argumentCaptor<StartTransformationRequest>().apply {
153+
verify(bearerClient).startTransformation(capture())
154+
verifyNoInteractions(streamingBearerClient)
155+
assertThat(actual).isInstanceOf(StartTransformationResponse::class.java)
156+
assertThat(actual).usingRecursiveComparison().comparingOnlyFields("transformationJobId").isEqualTo(exampleStartCodeMigrationResponse)
157+
}
158+
}
159+
149160
@Test
150161
fun `check getCodeModernizationPlan`() {
151162
val actual = gumbyClient.getCodeModernizationPlan(JobId("JobId"))

0 commit comments

Comments
 (0)