File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
src/test/kotlin/io/github/projectmapk/jackson/module/kogera/zPorted Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ class KotlinModuleTest {
2323 assertFalse(module.nullToEmptyCollection)
2424 assertFalse(module.nullToEmptyMap)
2525 assertFalse(module.nullIsSameAsDefault)
26- assertEquals (module.singletonSupport, false )
27- assertFalse (module.strictNullChecks)
26+ assertTrue (module.singletonSupport)
27+ assertTrue (module.strictNullChecks)
2828 }
2929
3030 @Test
@@ -35,8 +35,8 @@ class KotlinModuleTest {
3535 assertFalse(module.nullToEmptyCollection)
3636 assertFalse(module.nullToEmptyMap)
3737 assertFalse(module.nullIsSameAsDefault)
38- assertEquals( false , module.singletonSupport)
39- assertFalse (module.strictNullChecks)
38+ assertTrue( module.singletonSupport)
39+ assertTrue (module.strictNullChecks)
4040 }
4141
4242 @Test
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package io.github.projectmapk.jackson.module.kogera.zPorted.test.github
33import com.fasterxml.jackson.annotation.JsonIgnore
44import com.fasterxml.jackson.databind.ObjectMapper
55import com.fasterxml.jackson.databind.SerializationFeature
6+ import io.github.projectmapk.jackson.module.kogera.KotlinFeature
67import io.github.projectmapk.jackson.module.kogera.jacksonObjectMapper
78import io.github.projectmapk.jackson.module.kogera.readValue
89import io.github.projectmapk.jackson.module.kogera.zPorted.test.expectFailure
@@ -12,7 +13,7 @@ import org.junit.jupiter.api.Test
1213import org.junit.jupiter.api.fail
1314
1415class TestGithub27 {
15- val mapper: ObjectMapper = jacksonObjectMapper()
16+ val mapper: ObjectMapper = jacksonObjectMapper { disable( KotlinFeature . StrictNullChecks ) }
1617 .configure(SerializationFeature .INDENT_OUTPUT , false )
1718
1819 private data class ClassWithNullableInt (val sample : Int? )
Original file line number Diff line number Diff line change 11package io.github.projectmapk.jackson.module.kogera.zPorted.test.github.failing
22
3+ import io.github.projectmapk.jackson.module.kogera.KotlinFeature
34import io.github.projectmapk.jackson.module.kogera.KotlinFeature.SingletonSupport
45import io.github.projectmapk.jackson.module.kogera.jacksonObjectMapper
56import io.github.projectmapk.jackson.module.kogera.jsonMapper
@@ -30,7 +31,7 @@ class TestGithub518 {
3031 @Test
3132 fun deserializeEmptyObjectToSingletonUnitFails () {
3233 expectFailure<AssertionError >(" GitHub #518 has been fixed!" ) {
33- assertSame(jacksonObjectMapper() .readValue<Unit ?>(" {}" ), Unit )
34+ assertSame(jacksonObjectMapper { disable( SingletonSupport ) } .readValue<Unit ?>(" {}" ), Unit )
3435 }
3536 }
3637
You can’t perform that action at this time.
0 commit comments