Skip to content

Commit

Permalink
minor addition to #12 test
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 19, 2016
1 parent 345fac6 commit 931caa6
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 931caa6

Please sign in to comment.