Skip to content

Commit 4eb5562

Browse files
committed
Fix test
1 parent 3da5530 commit 4eb5562

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/StrictNullChecksTestOld.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.fasterxml.jackson.module.kotlin.test
22

3+
import com.fasterxml.jackson.databind.exc.InvalidNullException
34
import com.fasterxml.jackson.module.kotlin.KotlinFeature
4-
import com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException
55
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
66
import com.fasterxml.jackson.module.kotlin.readValue
77
import org.junit.jupiter.api.Assertions.assertArrayEquals
@@ -32,7 +32,7 @@ class StrictNullChecksTestOld {
3232

3333
@Test
3434
fun testListOfInt() {
35-
assertThrows<MissingKotlinParameterException> {
35+
assertThrows<InvalidNullException> {
3636
val json = """{"samples":[1, null]}"""
3737
mapper.readValue<ClassWithListOfInt>(json)
3838
}
@@ -62,7 +62,7 @@ class StrictNullChecksTestOld {
6262

6363
@Test
6464
fun testArrayOfInt() {
65-
assertThrows<MissingKotlinParameterException> {
65+
assertThrows<InvalidNullException> {
6666
val json = """{"samples":[1, null]}"""
6767
mapper.readValue<ClassWithArrayOfInt>(json)
6868
}
@@ -92,7 +92,7 @@ class StrictNullChecksTestOld {
9292

9393
@Test
9494
fun testMapOfStringToIntWithNullValue() {
95-
assertThrows<MissingKotlinParameterException> {
95+
assertThrows<InvalidNullException> {
9696
val json = """{ "samples": { "key": null } }"""
9797
mapper.readValue<ClassWithMapOfStringToInt>(json)
9898
}
@@ -121,7 +121,7 @@ class StrictNullChecksTestOld {
121121
@Disabled // this is a hard problem to solve and is currently not addressed
122122
@Test
123123
fun testListOfGenericWithNullValue() {
124-
assertThrows<MissingKotlinParameterException> {
124+
assertThrows<InvalidNullException> {
125125
val json = """{"samples":[1, null]}"""
126126
mapper.readValue<TestClass<List<Int>>>(json)
127127
}
@@ -137,7 +137,7 @@ class StrictNullChecksTestOld {
137137
@Disabled // this is a hard problem to solve and is currently not addressed
138138
@Test
139139
fun testMapOfGenericWithNullValue() {
140-
assertThrows<MissingKotlinParameterException> {
140+
assertThrows<InvalidNullException> {
141141
val json = """{ "samples": { "key": null } }"""
142142
mapper.readValue<TestClass<Map<String, Int>>>(json)
143143
}
@@ -153,7 +153,7 @@ class StrictNullChecksTestOld {
153153
@Disabled // this is a hard problem to solve and is currently not addressed
154154
@Test
155155
fun testArrayOfGenericWithNullValue() {
156-
assertThrows<MissingKotlinParameterException> {
156+
assertThrows<InvalidNullException> {
157157
val json = """{"samples":[1, null]}"""
158158
mapper.readValue<TestClass<Array<Int>>>(json)
159159
}

0 commit comments

Comments
 (0)