From 17eb07afd308d8923779addc0b654db53b869587 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Fri, 2 Jun 2023 10:23:55 -0700 Subject: [PATCH] Tiny improvement to #3690 test (wrt #3924) --- .../jackson/databind/convert/DisableCoercions3690Test.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/fasterxml/jackson/databind/convert/DisableCoercions3690Test.java b/src/test/java/com/fasterxml/jackson/databind/convert/DisableCoercions3690Test.java index eedd79f71d..5b0906e358 100644 --- a/src/test/java/com/fasterxml/jackson/databind/convert/DisableCoercions3690Test.java +++ b/src/test/java/com/fasterxml/jackson/databind/convert/DisableCoercions3690Test.java @@ -9,12 +9,13 @@ public class DisableCoercions3690Test extends BaseMapTest { + // [databind#3690] static class Input3690 { public List field; } // [databind#3690] - public void testFailMessage3690() throws Exception + public void testCoercionFail3690() throws Exception { ObjectMapper mapper = jsonMapperBuilder() .withCoercionConfigDefaults(config -> { @@ -31,6 +32,8 @@ public void testFailMessage3690() throws Exception mapper.readValue(json, Input3690.class); fail("Should not pass"); } catch (InvalidFormatException e) { + assertEquals(String.class, e.getTargetType()); + assertEquals(Integer.valueOf(1), e.getValue()); verifyException(e, "Cannot coerce Integer value (1)"); verifyException(e, "to `java.lang.String` value"); }