From 931caa61d3a02650e29069443aadf4e7881a75c0 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Tue, 19 Jul 2016 16:18:30 -0700 Subject: [PATCH] minor addition to #12 test --- .../fasterxml/jackson/module/mrbean/TestJDKTypes.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mrbean/src/test/java/com/fasterxml/jackson/module/mrbean/TestJDKTypes.java b/mrbean/src/test/java/com/fasterxml/jackson/module/mrbean/TestJDKTypes.java index 4808916a..2a83d84a 100644 --- a/mrbean/src/test/java/com/fasterxml/jackson/module/mrbean/TestJDKTypes.java +++ b/mrbean/src/test/java/com/fasterxml/jackson/module/mrbean/TestJDKTypes.java @@ -34,11 +34,18 @@ public void testNumbers() throws Exception assertSame(Double.class, nr.getClass()); } - public void testContainers() throws Exception + public void testIterable() throws Exception { Object ob = MAPPER.readValue("[ ]", Iterable.class); assertNotNull(ob); assertTrue(ob instanceof List); + + // Let's try with some data as well + Iterable itrb = MAPPER.readValue("[ 123 ]", Iterable.class); + assertTrue(itrb instanceof List); + List l = (List) itrb; + assertEquals(1, l.size()); + assertEquals(Integer.valueOf(123), l.get(0)); } public void testStringLike() throws Exception