Searched refs:MAPPER_TO_NULL (Results 1 – 3 of 3) sorted by relevance
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/convert/ |
D | CoerceFloatToIntTest.java | 29 private final ObjectMapper MAPPER_TO_NULL; { field in CoerceFloatToIntTest 30 MAPPER_TO_NULL = newJsonMapper(); 31 MAPPER_TO_NULL.coercionConfigFor(LogicalType.Integer) 115 assertNull(MAPPER_TO_NULL.readValue("1.5", Integer.class)); in testCoerceConfigFloatToNull() 117 assertEquals(Integer.valueOf(0), MAPPER_TO_NULL.readValue("1.5", Integer.TYPE)); in testCoerceConfigFloatToNull() 119 IntWrapper w = MAPPER_TO_NULL.readValue( "{\"i\":-2.25 }", IntWrapper.class); in testCoerceConfigFloatToNull() 121 int[] ints = MAPPER_TO_NULL.readValue("[ 2.5 ]", int[].class); in testCoerceConfigFloatToNull() 126 assertNull(MAPPER_TO_NULL.readValue("2.5", Long.class)); in testCoerceConfigFloatToNull() 127 assertEquals(Long.valueOf(0L), MAPPER_TO_NULL.readValue("-4.25", Long.TYPE)); in testCoerceConfigFloatToNull() 129 LongWrapper w = MAPPER_TO_NULL.readValue( "{\"l\":-2.25 }", LongWrapper.class); in testCoerceConfigFloatToNull() [all …]
|
D | CoerceToBooleanTest.java | 42 private final ObjectMapper MAPPER_TO_NULL; { field in CoerceToBooleanTest 43 MAPPER_TO_NULL = newJsonMapper(); 44 MAPPER_TO_NULL.coercionConfigFor(LogicalType.Boolean) 126 assertNull(MAPPER_TO_NULL.readValue("0", Boolean.class)); in testIntToNullCoercion() 127 assertNull(MAPPER_TO_NULL.readValue("1", Boolean.class)); in testIntToNullCoercion() 131 assertEquals(Boolean.FALSE, MAPPER_TO_NULL.readValue("0", Boolean.TYPE)); in testIntToNullCoercion() 132 assertEquals(Boolean.FALSE, MAPPER_TO_NULL.readValue("1", Boolean.TYPE)); in testIntToNullCoercion() 135 assertNull(MAPPER_TO_NULL.readValue("0", AtomicBoolean.class)); in testIntToNullCoercion() 136 assertNull(MAPPER_TO_NULL.readValue("1", AtomicBoolean.class)); in testIntToNullCoercion() 139 p = MAPPER_TO_NULL.readValue(DOC_WITH_0, BooleanPOJO.class); in testIntToNullCoercion() [all …]
|
D | CoerceEmptyArrayTest.java | 43 private final ObjectMapper MAPPER_TO_NULL; field in CoerceEmptyArrayTest 45 MAPPER_TO_NULL = newJsonMapper(); 46 MAPPER_TO_NULL.coercionConfigDefaults() 96 _verifyToNullCoercion(MAPPER_TO_NULL, targetType); in testPOJOFromEmptyArray() 132 _verifyToNullCoercion(MAPPER_TO_NULL, targetType); in testMapFromEmptyArray() 145 assertNull(MAPPER_TO_NULL.readerFor(targetType).readValue(EMPTY_ARRAY)); in testEnumMapFromEmptyArray() 171 _verifyToNullCoercion(MAPPER_TO_NULL, targetType); in testNumbersFromEmptyArray() 202 _verifyToNullCoercion(MAPPER_TO_NULL, targetType); in testOtherScalarsFromEmptyArray()
|