File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
firebase-ai/src/test/java/com/google/firebase/ai Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ internal class DevAPIStreamingSnapshotTests {
42
42
withTimeout(testTimeout) {
43
43
val responseList = responses.toList()
44
44
responseList.isEmpty() shouldBe false
45
- responseList.first().candidates.first().finishReason shouldBe FinishReason .STOP
46
- responseList.first().candidates.first().content.parts.isEmpty() shouldBe false
47
- responseList.first().candidates.first().safetyRatings.isEmpty() shouldBe false
45
+ responseList.last().candidates.first().let {
46
+ it.finishReason shouldBe FinishReason .STOP
47
+ it.content.parts.isEmpty() shouldBe false
48
+ }
48
49
}
49
50
}
50
51
@@ -56,10 +57,9 @@ internal class DevAPIStreamingSnapshotTests {
56
57
withTimeout(testTimeout) {
57
58
val responseList = responses.toList()
58
59
responseList.isEmpty() shouldBe false
59
- responseList.forEach {
60
- it.candidates.first().finishReason shouldBe FinishReason .STOP
61
- it.candidates.first().content.parts.isEmpty() shouldBe false
62
- it.candidates.first().safetyRatings.isEmpty() shouldBe false
60
+ responseList.last().candidates.first().let {
61
+ it.finishReason shouldBe FinishReason .STOP
62
+ it.content.parts.isEmpty() shouldBe false
63
63
}
64
64
}
65
65
}
You can’t perform that action at this time.
0 commit comments