Skip to content

Commit

Permalink
Add failing test for GitHub #196
Browse files Browse the repository at this point in the history
  • Loading branch information
dinomite committed Feb 19, 2021
1 parent 7110447 commit c2be1f4
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.fasterxml.jackson.module.kotlin.test.github.failing

import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import com.fasterxml.jackson.module.kotlin.test.expectFailure
import org.junit.Test
import kotlin.test.assertSame

class TestGithub196 {
@Test
fun testUnitSingletonDeserialization() {
// An empty object should be deserialized as *the* Unit instance, but is not
expectFailure<AssertionError>("GitHub #196 has been fixed!") {
assertSame(jacksonObjectMapper().readValue("{}"), Unit)
}
}
}

0 comments on commit c2be1f4

Please sign in to comment.