Skip to content

Commit

Permalink
test(gemini-client): simplify JSON serialization setup
Browse files Browse the repository at this point in the history
Refactor test to use direct JSON encoding without custom serialization configuration.
  • Loading branch information
hanrw committed Jan 8, 2025
1 parent e3bc8d2 commit d055084
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,8 @@ class GenerateContentRequestTest {
stream = false
)

val json = Json {
serializersModule = SerializersModule {
polymorphic(Part::class) {
subclass(Part.TextPart::class, Part.TextPart.serializer())
subclass(Part.InlineDataPart::class, Part.InlineDataPart.serializer())
}
}
}

// When
val result = json.encodeToString(
val result = Json.encodeToString(
GenerateContentRequest.serializer(),
generateContentRequest
)
Expand Down

0 comments on commit d055084

Please sign in to comment.