Skip to content

Commit

Permalink
Add test case for array resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglingsong committed Jan 13, 2018
1 parent 729e075 commit f51a6da
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public void shallResolvePOJO() throws Exception {
map.put("list", list);
assertEquals("bar", compile("$[1]").resolve(list, new PoJoResolver()));
assertEquals("bar", compile("$.list[1]").resolve(map, JavaCollectionProvider.INSTANCE));

int[] array = new int[]{12, 34};
assertEquals(34, compile("$[1]").resolve(array, new PoJoResolver()));
assertEquals(12, compile("$[0]").resolve(array, new PoJoResolver()));

}

@Test
Expand Down

0 comments on commit f51a6da

Please sign in to comment.