Skip to content

Commit 06a10ce

Browse files
committed
fix unit ttest
1 parent 719a2e3 commit 06a10ce

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

plugins/amazonq/shared/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImplTest.kt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,43 @@ class AmazonQLanguageClientImplTest {
6262
@Test
6363
fun `configuration for codeWhisperer respects opt-out`() {
6464
CodeWhispererSettings.getInstance().toggleMetricOptIn(false)
65+
CodeWhispererSettings.getInstance().toggleWorkspaceContextEnabled(true)
6566
assertThat(sut.configuration(configurationParams("aws.codeWhisperer")).get())
6667
.singleElement()
6768
.isEqualTo(
6869
CodeWhispererLspConfiguration(
6970
shouldShareData = false,
70-
shouldShareCodeReferences = false
71+
shouldShareCodeReferences = false,
72+
shouldEnableWorkspaceContext = true
7173
)
7274
)
7375
}
7476

7577
@Test
7678
fun `configuration for codeWhisperer respects opt-in`() {
7779
CodeWhispererSettings.getInstance().toggleMetricOptIn(true)
80+
CodeWhispererSettings.getInstance().toggleWorkspaceContextEnabled(true)
7881
assertThat(sut.configuration(configurationParams("aws.codeWhisperer")).get())
7982
.singleElement()
8083
.isEqualTo(
8184
CodeWhispererLspConfiguration(
8285
shouldShareData = true,
83-
shouldShareCodeReferences = false
86+
shouldShareCodeReferences = false,
87+
shouldEnableWorkspaceContext = true
88+
)
89+
)
90+
}
91+
92+
@Test
93+
fun `configuration for workspace context respects opt-in`() {
94+
CodeWhispererSettings.getInstance().toggleWorkspaceContextEnabled(false)
95+
assertThat(sut.configuration(configurationParams("aws.codeWhisperer")).get())
96+
.singleElement()
97+
.isEqualTo(
98+
CodeWhispererLspConfiguration(
99+
shouldShareData = true,
100+
shouldShareCodeReferences = false,
101+
shouldEnableWorkspaceContext = false
84102
)
85103
)
86104
}

0 commit comments

Comments
 (0)