You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonq/TelemetryHelperTest.kt
+19-13Lines changed: 19 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -149,12 +149,18 @@ class TelemetryHelperTest : HeavyPlatformTestCase() {
149
149
overridefunsetUp() {
150
150
super.setUp()
151
151
// Initialize mock managers using JUnit Rule pattern
152
-
mockClientManager.apply(object:Statement() {
153
-
overridefunevaluate() {}
154
-
}, org.junit.runner.Description.EMPTY).evaluate()
155
-
mockTelemetryService.apply(object:Statement() {
156
-
overridefunevaluate() {}
157
-
}, org.junit.runner.Description.EMPTY).evaluate()
152
+
mockClientManager.apply(
153
+
object:Statement() {
154
+
overridefunevaluate() {}
155
+
},
156
+
org.junit.runner.Description.EMPTY
157
+
).evaluate()
158
+
mockTelemetryService.apply(
159
+
object:Statement() {
160
+
overridefunevaluate() {}
161
+
},
162
+
org.junit.runner.Description.EMPTY
163
+
).evaluate()
158
164
// set up sut
159
165
appInitContext =AmazonQAppInitContext(
160
166
project = project,
@@ -245,7 +251,7 @@ class TelemetryHelperTest : HeavyPlatformTestCase() {
245
251
verify(mockBatcher).enqueue(capture())
246
252
val event = firstValue.data.find { it.name =="amazonq_addMessage" }
247
253
assertNotNull(event)
248
-
assertThat(event!!)
254
+
assertThat(requireNotNull(event))
249
255
.matches({ it.metadata["cwsprChatConversationId"] == conversationId }, "conversation id doesn't match")
250
256
.matches({ it.metadata["cwsprChatMessageId"] =="messageId" }, "message id doesn't match")
251
257
.matches(
@@ -329,7 +335,7 @@ class TelemetryHelperTest : HeavyPlatformTestCase() {
329
335
verify(mockBatcher).enqueue(capture())
330
336
val event = firstValue.data.find { it.name =="amazonq_interactWithMessage" }
0 commit comments