Skip to content

Commit 85d9cf6

Browse files
committed
Fix "failing failing" test for #396
1 parent bedb6ea commit 85d9cf6

File tree

1 file changed

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

1 file changed

+5
-5
lines changed

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/failing/Github396.kt renamed to src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github396.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ import kotlin.test.assertEquals
99

1010
class TestGithub396 {
1111
/**
12-
* Succeeds in Jackson 2.11.x, but fails in Jackson 2.12.0
12+
* Succeeds in Jackson 2.11.x, but fails in Jackson 2.12.0.
13+
* But succeeds again in 2.15.0.
14+
*
1315
* See https://github.com/FasterXML/jackson-module-kotlin/issues/396
1416
*/
1517
@Test
1618
fun testMissingConstructor() {
1719
val mapper = XmlMapper().registerKotlinModule()
1820

1921
val xml = "<product><stuff></stuff></product>"
20-
expectFailure<MismatchedInputException>("GitHub #396 has been fixed!") {
21-
val product: Product = mapper.readValue(xml, Product::class.java)
22+
val product: Product = mapper.readValue(xml, Product::class.java)
2223

23-
assertEquals(Product(null), product)
24-
}
24+
assertEquals(Product(Stuff(null)), product)
2525
}
2626

2727
private data class Stuff(val str: String?)

0 commit comments

Comments
 (0)