Skip to content

Commit

Permalink
tiny test improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Apr 27, 2024
1 parent be915f3 commit d67b60a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Project: jackson-databind
(reported by Joo-Hyuk K)
(fix by Joo-Hyuk K)
#4471: Reconsider deprecation of `JsonNode.asText(defaultValue)`
(reported by @aerisnju)
(requested by @aerisnju)
(fix by Joo-Hyuk K)
2.17.0 (12-Mar-2024)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public void testMissing()
assertTrue(n.isMissingNode());
assertEquals(JsonToken.NOT_AVAILABLE, n.asToken());
assertEquals("", n.asText());
assertEquals("default", n.asText("default"));
assertStandardEquals(n);
// 10-Dec-2018, tatu: With 2.10, should serialize same as via ObjectMapper/ObjectWriter
// 10-Dec-2019, tatu: Surprise! No, this is not how it worked in 2.9, nor does it make
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public void testBasicsWithNullNode() throws Exception
assertEquals(0L, n.longValue());
assertEquals(BigDecimal.ZERO, n.decimalValue());
assertEquals(BigInteger.ZERO, n.bigIntegerValue());
// may be odd but...
assertEquals("null", n.asText());
assertEquals("fallback", n.asText("fallback"));

assertEquals(0, n.size());
assertTrue(n.isEmpty());
Expand Down

0 comments on commit d67b60a

Please sign in to comment.