From 0c55d31cdd7cfebeca7a138a058ab9b1c7bd53bb Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Sat, 28 Dec 2024 00:17:25 -0800 Subject: [PATCH] Fix tests wrt databind changes --- .../jackson/dataformat/cbor/mapper/TreeReadViaMapperTest.java | 3 +-- .../jackson/dataformat/smile/mapper/TreeReadViaMapperTest.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/TreeReadViaMapperTest.java b/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/TreeReadViaMapperTest.java index dd9bb47b6..3ff86e90e 100644 --- a/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/TreeReadViaMapperTest.java +++ b/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/TreeReadViaMapperTest.java @@ -27,7 +27,7 @@ public void testSimple() throws Exception ObjectNode main = (ObjectNode) result; assertEquals("Image", main.propertyNames().next()); - JsonNode ob = main.elements().next(); + JsonNode ob = main.iterator().next(); assertType(ob, ObjectNode.class); ObjectNode imageMap = (ObjectNode) ob; @@ -61,7 +61,6 @@ public void testSimple() throws Exception assertTrue(ob.isArray()); ArrayNode idList = (ArrayNode) ob; assertEquals(4, idList.size()); - assertEquals(4, calcLength(idList.elements())); assertEquals(4, calcLength(idList.iterator())); { int[] values = new int[] { diff --git a/smile/src/test/java/tools/jackson/dataformat/smile/mapper/TreeReadViaMapperTest.java b/smile/src/test/java/tools/jackson/dataformat/smile/mapper/TreeReadViaMapperTest.java index 00fe7470c..6540deee9 100644 --- a/smile/src/test/java/tools/jackson/dataformat/smile/mapper/TreeReadViaMapperTest.java +++ b/smile/src/test/java/tools/jackson/dataformat/smile/mapper/TreeReadViaMapperTest.java @@ -27,7 +27,7 @@ public void testSimple() throws Exception ObjectNode main = (ObjectNode) result; assertEquals("Image", main.propertyNames().next()); - JsonNode ob = main.elements().next(); + JsonNode ob = main.iterator().next(); assertType(ob, ObjectNode.class); ObjectNode imageMap = (ObjectNode) ob; @@ -61,7 +61,6 @@ public void testSimple() throws Exception assertTrue(ob.isArray()); ArrayNode idList = (ArrayNode) ob; assertEquals(4, idList.size()); - assertEquals(4, calcLength(idList.elements())); assertEquals(4, calcLength(idList.iterator())); { int[] values = new int[] {