diff --git a/beehive-jdbc-mapper/src/test/java/com/moparisthebest/jdbc/QueryMapperTest.java b/beehive-jdbc-mapper/src/test/java/com/moparisthebest/jdbc/QueryMapperTest.java index bd9368d..ab502c8 100644 --- a/beehive-jdbc-mapper/src/test/java/com/moparisthebest/jdbc/QueryMapperTest.java +++ b/beehive-jdbc-mapper/src/test/java/com/moparisthebest/jdbc/QueryMapperTest.java @@ -229,10 +229,15 @@ public class QueryMapperTest { @Test public void testSelectLongPrimitive() throws Throwable { - final Long expected = fieldPerson1.getPersonNo(); - Assert.assertEquals(expected, qm.toObject("SELECT person_no FROM person WHERE person_no = ?", long.class, expected)); + final long expected = fieldPerson1.getPersonNo(); + Assert.assertEquals((Object)expected, qm.toObject("SELECT person_no FROM person WHERE person_no = ?", long.class, expected)); } + @Test + public void testSelectLongObjectArray() throws Throwable { + final Long[] expected = {fieldPerson1.getPersonNo()}; + Assert.assertArrayEquals(expected, qm.toArray("SELECT person_no FROM person WHERE person_no = ?", Long.class, expected[0])); + } private List> getListMap() { final List> arrayMap = new ArrayList>();