Skip to content

Commit d5008b2

Browse files
committed
Fix tests
1 parent 5dc7e21 commit d5008b2

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/test/kotlin/com/fasterxml/jackson/module/kotlin/kogeraIntegration/deser/valueClass/WithoutCustomDeserializeMethodTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import org.junit.jupiter.api.Nested
99
import org.junit.jupiter.api.assertThrows
1010
import org.junit.jupiter.api.Test
1111
import java.lang.reflect.InvocationTargetException
12+
import kotlin.test.assertNotEquals
1213

1314
class WithoutCustomDeserializeMethodTest {
1415
companion object {
@@ -42,10 +43,8 @@ class WithoutCustomDeserializeMethodTest {
4243
// failing
4344
@Test
4445
fun nullString() {
45-
org.junit.jupiter.api.assertThrows<NullPointerException>("#209 has been fixed.") {
46-
val result = defaultMapper.readValue<NullableObject>("null")
47-
assertEquals(NullableObject(null), result)
48-
}
46+
val result = defaultMapper.readValue<NullableObject?>("null")
47+
assertNotEquals(NullableObject(null), result, "kogera #209 has been fixed.")
4948
}
5049
}
5150
}

src/test/kotlin/com/fasterxml/jackson/module/kotlin/kogeraIntegration/deser/valueClass/deserializer/SpecifiedForObjectMapperTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.fasterxml.jackson.module.kotlin.kogeraIntegration.deser.valueClass.Pr
99
import org.junit.jupiter.api.Assertions.assertEquals
1010
import org.junit.jupiter.api.Nested
1111
import org.junit.jupiter.api.Test
12+
import kotlin.test.assertNotEquals
1213

1314
class SpecifiedForObjectMapperTest {
1415
companion object {
@@ -48,10 +49,8 @@ class SpecifiedForObjectMapperTest {
4849
// failing
4950
@Test
5051
fun nullString() {
51-
org.junit.jupiter.api.assertThrows<NullPointerException>("#209 has been fixed.") {
52-
val result = mapper.readValue<NullableObject>("null")
53-
assertEquals(NullableObject("null-value-deser"), result)
54-
}
52+
val result = mapper.readValue<NullableObject?>("null")
53+
assertNotEquals(NullableObject("null-value-deser"), result, "kogera #209 has been fixed.")
5554
}
5655
}
5756
}

0 commit comments

Comments
 (0)