File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/test/kotlin/com/fasterxml/jackson/module/kotlin/test Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,22 +24,22 @@ class KClassSerializerDeserializerTest {
24
24
25
25
@Test
26
26
fun `test custom serializer expecting object serialized with rounding serializer applied` () {
27
- val jsonString = objectMapper.writeValueAsString(TestDoubleData (nonNullVal = 1.5567 , nullVal = 1.5567 ))
27
+ val jsonString = objectMapper.writeValueAsString(TestDoubleData (nonNullVal = 1.5567 , nullVal = 1.5678 ))
28
28
val testResult = objectMapper.readValue(jsonString, TestDoubleData ::class .java)
29
29
assertThat(testResult.nonNullVal, equalTo(1.56 ))
30
- assertThat(testResult.nullVal, equalTo(1.56 ))
30
+ assertThat(testResult.nullVal, equalTo(1.57 ))
31
31
}
32
32
33
33
@Test
34
34
fun `test custom deserializer expecting object deserialized with rounding deserializer applied` () {
35
35
val testResult = objectMapper.readValue<TestDoubleData >("""
36
36
{
37
37
"nonNullVal":1.5567,
38
- "nullVal":1.5567
38
+ "nullVal":1.5678
39
39
}
40
40
""" .trimIndent())
41
41
assertThat(testResult.nonNullVal, equalTo(1.56 ))
42
- assertThat(testResult.nullVal, equalTo(1.56 ))
42
+ assertThat(testResult.nullVal, equalTo(1.57 ))
43
43
}
44
44
}
45
45
You can’t perform that action at this time.
0 commit comments