Skip to content

Commit d91afa4

Browse files
committed
revise format
1 parent a2d1bdd commit d91afa4

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

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

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ class CodeWhispererModelConfiguratorTest {
144144
)
145145
}
146146
abManager.getCustomizationFeature()?.let { customization ->
147-
sut.switchCustomization(projectRule.project, CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
147+
sut.switchCustomization(
148+
projectRule.project,
149+
CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
148150
isOverride = true
149151
)
150152
}
@@ -153,7 +155,7 @@ class CodeWhispererModelConfiguratorTest {
153155

154156
@Test
155157
fun `should update customization when user has never selected one`() {
156-
val ssoConn = spy(LegacyManagedBearerSsoConnection(region = "us-east-1", startUrl = "url-1", scopes = Q_SCOPES))
158+
val ssoConn = LegacyManagedBearerSsoConnection(region = "us-east-1", startUrl = "url-1", scopes = Q_SCOPES)
157159
ToolkitConnectionManager.getInstance(projectRule.project).switchConnection(ssoConn)
158160

159161
// Step 1: Server pushes first customization (arnOverride1)
@@ -163,7 +165,9 @@ class CodeWhispererModelConfiguratorTest {
163165
)
164166
}
165167
abManager.getCustomizationFeature()?.let { customization ->
166-
sut.switchCustomization(projectRule.project, CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
168+
sut.switchCustomization(
169+
projectRule.project,
170+
CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
167171
isOverride = true
168172
)
169173
}
@@ -180,7 +184,9 @@ class CodeWhispererModelConfiguratorTest {
180184
}
181185

182186
abManager.getCustomizationFeature()?.let { customization ->
183-
sut.switchCustomization(projectRule.project, CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
187+
sut.switchCustomization(
188+
projectRule.project,
189+
CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
184190
isOverride = true
185191
)
186192
}
@@ -191,7 +197,7 @@ class CodeWhispererModelConfiguratorTest {
191197

192198
@Test
193199
fun `should not override user selection when server updates customization`() {
194-
val ssoConn = spy(LegacyManagedBearerSsoConnection(region = "us-east-1", startUrl = "url-1", scopes = Q_SCOPES))
200+
val ssoConn = LegacyManagedBearerSsoConnection(region = "us-east-1", startUrl = "url-1", scopes = Q_SCOPES)
195201
ToolkitConnectionManager.getInstance(projectRule.project).switchConnection(ssoConn)
196202

197203
// Step 1: Server pushes first customization (arnOverride1)
@@ -202,7 +208,9 @@ class CodeWhispererModelConfiguratorTest {
202208
}
203209

204210
abManager.getCustomizationFeature()?.let { customization ->
205-
sut.switchCustomization(projectRule.project, CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
211+
sut.switchCustomization(
212+
projectRule.project,
213+
CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
206214
isOverride = true
207215
)
208216
}
@@ -218,7 +226,9 @@ class CodeWhispererModelConfiguratorTest {
218226
}
219227

220228
abManager.getCustomizationFeature()?.let { customization ->
221-
sut.switchCustomization(projectRule.project, CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
229+
sut.switchCustomization(
230+
projectRule.project,
231+
CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
222232
isOverride = true
223233
)
224234
}
@@ -230,7 +240,9 @@ class CodeWhispererModelConfiguratorTest {
230240
val userCustomization = CodeWhispererCustomization("userSelectedArn", "userChoice", null)
231241
sut.switchCustomization(projectRule.project, userCustomization)
232242
abManager.getCustomizationFeature()?.let { customization ->
233-
sut.switchCustomization(projectRule.project, CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
243+
sut.switchCustomization(
244+
projectRule.project,
245+
CodeWhispererCustomization(arn = customization.value.stringValue(), name = customization.variation),
234246
isOverride = true
235247
)
236248
}
@@ -239,7 +251,6 @@ class CodeWhispererModelConfiguratorTest {
239251
.isEqualTo(userCustomization)
240252
}
241253

242-
243254
@Test
244255
fun `loadState should load the correct values into memory`() {
245256
credManager.clear()

0 commit comments

Comments
 (0)