Skip to content

Commit

Permalink
Added test case for correct numeric string deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinha610 authored Jun 24, 2024
1 parent fe077de commit 6b7863f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,16 @@ class ConditionValueTest {
result.values[0] shouldBe "test1"
result.values[1] shouldBe "test2"
}

@Test
fun `decode numeric string value with correct type`() {
val element = """
"1"
""".trimIndent()

val result = Json.decodeFromString<ConditionValue>(element)

result.shouldBeTypeOf<ConditionValue.StringValue>()
result.value shouldBe "1"
}
}

0 comments on commit 6b7863f

Please sign in to comment.