@Override @Test public void testApplyType() throws Exception { when(rs.getInt(1)).thenReturn(Integer.MIN_VALUE); assertEquals(Integer.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testMatchNegative() { assertFalse(handler.match(Float.class)); }
@Test public void testMatch() { assertTrue(handler.match(matchingType)); }
@Override @Test public void testApplyType() throws Exception { when(rs.getTimestamp(1)).thenReturn(new Timestamp(new Date().getTime())); assertEquals(Timestamp.class, handler.apply(rs, 1).getClass()); } }
@Test public void testMatchNegative() { assertFalse(handler.match(Integer.class)); }
@Override @Test public void testApplyType() throws Exception { when(rs.getShort(1)).thenReturn(Short.MIN_VALUE); assertEquals(Short.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testApplyType() throws Exception { when(rs.getLong(1)).thenReturn(Long.MIN_VALUE); assertEquals(Long.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testApplyType() throws Exception { when(rs.getByte(1)).thenReturn(Byte.MIN_VALUE); assertEquals(Byte.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testApplyType() throws Exception { when(rs.getFloat(1)).thenReturn(Float.MIN_VALUE); assertEquals(Float.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testApplyType() throws Exception { when(rs.getBoolean(1)).thenReturn(Boolean.TRUE); assertEquals(Boolean.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testApplyType() throws Exception { when(rs.getString(1)).thenReturn("tester"); assertEquals(String.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testApplyType() throws Exception { when(rs.getDouble(1)).thenReturn(Double.MIN_VALUE); assertEquals(Double.class, handler.apply(rs, 1).getClass()); } }
@Override @Test public void testApplyType() throws Exception { when(rs.getSQLXML(1)).thenReturn(sqlxml); assertTrue(SQLXML.class.isAssignableFrom(handler.apply(rs, 1).getClass())); } }