From 04fec08c6d8d3170043710abb1672d01370d5e8d Mon Sep 17 00:00:00 2001 From: wenshao Date: Thu, 15 Sep 2011 06:02:17 +0000 Subject: [PATCH] bvt git-svn-id: http://code.alibabatech.com/svn/druid/trunk@750 b9813039-fb51-4c41-a8b9-e21c2acb5095 --- .../druid/bvt/pool/PoolableResultSetTest.java | 172 ++++++++++++++++++ 1 file changed, 172 insertions(+) diff --git a/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java b/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java index c8e48c9404..0110a7f3fe 100644 --- a/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java +++ b/src/test/java/com/alibaba/druid/bvt/pool/PoolableResultSetTest.java @@ -12,6 +12,7 @@ import com.alibaba.druid.pool.PoolableStatement; public class PoolableResultSetTest extends TestCase { + @SuppressWarnings("deprecation") public void test_0() throws Exception { PoolableStatement stmt = new PoolableStatement(null, null) { @@ -240,5 +241,176 @@ public class PoolableResultSetTest extends TestCase { Assert.assertNotNull(error); } + // //////////////// + + { + SQLException error = null; + try { + resultSet.getString("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBoolean("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getByte("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getShort("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getInt("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getLong("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getFloat("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getDouble("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBigDecimal("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBigDecimal("0", 1); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBytes("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getDate("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getTime("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getTimestamp("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getAsciiStream("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getUnicodeStream("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } + + { + SQLException error = null; + try { + resultSet.getBinaryStream("0"); + } catch (SQLException ex) { + error = ex; + } + Assert.assertNotNull(error); + } } }