You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/kotlin/com/fasterxml/jackson/module/kotlin/kogeraIntegration/deser/valueClass/JacksonInjectTest.kt
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -31,24 +31,28 @@ class JacksonInjectTest {
31
31
32
32
@Test
33
33
funtest() {
34
-
val injectables =InjectableValues.Std(
35
-
mapOf(
36
-
"pNn" to Primitive(0),
37
-
"pN" to Primitive(1),
38
-
"nnoNn" to NonNullObject("nnoNn"),
39
-
"nnoN" to NonNullObject("nnoN"),
40
-
"noNnNn" to NullableObject("noNnNn"),
41
-
"noNnN" to NullableObject(null),
42
-
"noNNn" to NullableObject("noNNn"),
43
-
"noNN" to NullableObject(null)
44
-
)
34
+
val injectables =mapOf(
35
+
"pNn" to Primitive(0),
36
+
"pN" to Primitive(1),
37
+
"nnoNn" to NonNullObject("nnoNn"),
38
+
"nnoN" to NonNullObject("nnoN"),
39
+
"noNnNn" to NullableObject("noNnNn"),
40
+
"noNnN" to NullableObject(null),
41
+
"noNNn" to NullableObject("noNNn"),
42
+
"noNN" to NullableObject(null)
45
43
)
46
44
47
45
val reader = jacksonObjectMapper()
48
46
.readerFor(Dto::class.java)
49
-
.with(injectables)
47
+
.with(InjectableValues.Std(injectables))
48
+
49
+
val result = reader.readValue<Dto>("{}")
50
+
val expected = ::Dto.let { ctor ->
51
+
val args = ctor.parameters.associateWith { injectables[it.name] }
0 commit comments