Skip to content

Commit c158266

Browse files
committed
test
1 parent da899c8 commit c158266

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererModelConfiguratorTest.kt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,33 @@ class CodeWhispererModelConfiguratorTest {
559559
assertThat(actual.previousAvailableCustomizations["fake-sso-url"]).isEqualTo(listOf("arn_1", "arn_2", "arn_3"))
560560
}
561561

562+
@Test
563+
fun `backward compatibility - should still be deseriealizable where profile field is not present`() {
564+
val xml = xmlElement(
565+
"""
566+
<component name="codewhispererCustomizationStates">
567+
<option name="connectionIdToActiveCustomizationArn">
568+
<map>
569+
<entry key="sso-session:foo">
570+
<value>
571+
<CodeWhispererCustomization>
572+
<option name="arn" value="arn:foo" />
573+
<option name="name" value="Customization-foo" />
574+
<option name="description" value="Foo foo foo foo" />
575+
</CodeWhispererCustomization>
576+
</value>
577+
</entry>
578+
</map>
579+
</option>
580+
</component>
581+
""".trimIndent()
582+
)
583+
584+
val actual = XmlSerializer.deserialize(xml, CodeWhispererCustomizationState::class.java)
585+
val cnt = actual.connectionIdToActiveCustomizationArn.size
586+
assertThat(cnt).isEqualTo(1)
587+
}
588+
562589
@Test
563590
fun `deserialize users choosing default customization`() {
564591
val element = xmlElement(

0 commit comments

Comments
 (0)