File tree 1 file changed +4
-4
lines changed
firebase-ai/src/test/java/com/google/firebase/ai 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ internal class DevAPIUnarySnapshotTests {
35
35
36
36
@Test
37
37
fun `short reply` () =
38
- goldenDevAPIUnaryFile(" unary-success-basic-reply-short.txt " ) {
38
+ goldenDevAPIUnaryFile(" unary-success-basic-reply-short.json " ) {
39
39
withTimeout(testTimeout) {
40
40
val response = model.generateContent(" prompt" )
41
41
@@ -47,7 +47,7 @@ internal class DevAPIUnarySnapshotTests {
47
47
48
48
@Test
49
49
fun `long reply` () =
50
- goldenDevAPIUnaryFile(" unary-success-basic-reply-long.txt " ) {
50
+ goldenDevAPIUnaryFile(" unary-success-basic-reply-long.json " ) {
51
51
withTimeout(testTimeout) {
52
52
val response = model.generateContent(" prompt" )
53
53
@@ -85,14 +85,14 @@ internal class DevAPIUnarySnapshotTests {
85
85
86
86
@Test
87
87
fun `invalid api key` () =
88
- goldenDevAPIUnaryFile(" unary-failure-api-key.txt " , HttpStatusCode .BadRequest ) {
88
+ goldenDevAPIUnaryFile(" unary-failure-api-key.json " , HttpStatusCode .BadRequest ) {
89
89
withTimeout(testTimeout) {
90
90
shouldThrow<InvalidAPIKeyException > { model.generateContent(" prompt" ) }
91
91
}
92
92
}
93
93
@Test
94
94
fun `unknown model` () =
95
- goldenDevAPIUnaryFile(" unary-failure-unknown-model.txt " , HttpStatusCode .NotFound ) {
95
+ goldenDevAPIUnaryFile(" unary-failure-unknown-model.json " , HttpStatusCode .NotFound ) {
96
96
withTimeout(testTimeout) { shouldThrow<ServerException > { model.generateContent(" prompt" ) } }
97
97
}
98
98
}
You can’t perform that action at this time.
0 commit comments