Skip to content

Commit 8ada33f

Browse files
committed
Added test case for isSetter to work.
1 parent 24e2968 commit 8ada33f

File tree

1 file changed

+14
-0
lines changed
  • src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github

1 file changed

+14
-0
lines changed

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github340.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.fasterxml.jackson.module.kotlin.test.github
22

33
import com.fasterxml.jackson.databind.ObjectMapper
4+
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
45
import com.fasterxml.jackson.module.kotlin.kotlinModule
56
import com.fasterxml.jackson.module.kotlin.readValue
67
import org.junit.Test
@@ -29,4 +30,17 @@ class OwnerRequestTest {
2930
val value: NoIsField = jackson.readValue(json)
3031
assertEquals("Got a foo", value.foo)
3132
}
33+
34+
// A test case for isSetter to work, added with the fix for this issue.
35+
class IsSetter {
36+
lateinit var isFoo: String
37+
}
38+
39+
@Test
40+
fun isSetterTest() {
41+
val json = """{"isFoo":"bar"}"""
42+
val isSetter: IsSetter = jackson.readValue(json)
43+
44+
assertEquals("bar", isSetter.isFoo)
45+
}
3246
}

0 commit comments

Comments
 (0)