Skip to content

Commit c2be1f4

Browse files
committed
Add failing test for GitHub #196
1 parent 7110447 commit c2be1f4

File tree

1 file changed

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

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.fasterxml.jackson.module.kotlin.test.github.failing
2+
3+
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
4+
import com.fasterxml.jackson.module.kotlin.readValue
5+
import com.fasterxml.jackson.module.kotlin.test.expectFailure
6+
import org.junit.Test
7+
import kotlin.test.assertSame
8+
9+
class TestGithub196 {
10+
@Test
11+
fun testUnitSingletonDeserialization() {
12+
// An empty object should be deserialized as *the* Unit instance, but is not
13+
expectFailure<AssertionError>("GitHub #196 has been fixed!") {
14+
assertSame(jacksonObjectMapper().readValue("{}"), Unit)
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)