From 645d39f8ededc3ec15dbcc52e93064e7de3d9486 Mon Sep 17 00:00:00 2001 From: wenshao Date: Tue, 28 Aug 2012 16:11:41 +0800 Subject: [PATCH] add FilterChainImpl testcase --- .../druid/bvt/filter/FilterChainImplTest.java | 375 +++++++++++ .../bvt/filter/FilterChainImplTest2.java | 604 ++++++++++++++++++ 2 files changed, 979 insertions(+) create mode 100644 src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest.java create mode 100644 src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest2.java diff --git a/src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest.java b/src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest.java new file mode 100644 index 0000000000..b6c95ed016 --- /dev/null +++ b/src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest.java @@ -0,0 +1,375 @@ +package com.alibaba.druid.bvt.filter; + +import java.sql.CallableStatement; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.NClob; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Statement; +import java.sql.Types; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import com.alibaba.druid.filter.FilterChainImpl; +import com.alibaba.druid.mock.MockNClob; +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.proxy.jdbc.ConnectionProxy; +import com.alibaba.druid.util.JdbcUtils; + +public class FilterChainImplTest extends TestCase { + + private DruidDataSource dataSource; + + protected void setUp() throws Exception { + dataSource = new DruidDataSource(); + + dataSource.setUrl("jdbc:mock:xxx"); + dataSource.setFilters("stat"); + + dataSource.init(); + } + + protected void tearDown() throws Exception { + JdbcUtils.close(dataSource); + } + + public void test_size() { + Assert.assertEquals(dataSource.getProxyFilters().size(), new FilterChainImpl(dataSource).getFilterSize()); + } + + public void test_unwrap() throws Exception { + Assert.assertNull(new FilterChainImpl(dataSource).unwrap(null, null)); + } + + public void test_unwrap_1() throws Exception { + Assert.assertNull(new FilterChainImpl(dataSource).wrap((Connection) null, null)); + } + + public void test_unwrap_2() throws Exception { + Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) null, (Statement) null)); + } + + public void test_unwrap_3() throws Exception { + Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) null, (PreparedStatement) null, "")); + } + + public void test_unwrap_4() throws Exception { + Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) null, (CallableStatement) null, "")); + } + + public void test_unwrap_5() throws Exception { + Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) null, (Clob) null)); + } + + public void test_unwrap_6() throws Exception { + Connection conn = dataSource.getConnection(); + Assert.assertTrue(new FilterChainImpl(dataSource).wrap((ConnectionProxy) null, new MockNClob()) instanceof NClob); + conn.close(); + } + + public void test_unwrap_7() throws Exception { + Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) null, (NClob) null)); + } + + public void test_getUnicodeStream() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getUnicodeStream(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getUnicodeStream_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getUnicodeStream("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getRef() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getRef(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getRef_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getRef("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getArray() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getArray(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getArray_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getArray("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getURL() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getURL(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getURL_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getURL("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getRowId() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getURL(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getRowId_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getURL("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getNClob() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getNClob(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getNClob_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getNClob("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getSQLXML() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getSQLXML(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getSQLXML_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getSQLXML("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getNString() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getNString(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getNString_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getNString("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getNCharacterStream() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getNCharacterStream(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getNCharacterStream_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getNCharacterStream("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getObject() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getObject(1)); + + rs.close(); + stmt.close(); + conn.close(); + + } + + public void test_getObject_1() throws Exception { + Connection conn = dataSource.getConnection(); + PreparedStatement stmt = conn.prepareStatement("select ?"); + stmt.setNull(1, Types.VARCHAR); + ResultSet rs = stmt.executeQuery(); + rs.next(); + + Assert.assertNull(rs.getObject("1")); + + rs.close(); + stmt.close(); + conn.close(); + + } +} diff --git a/src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest2.java b/src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest2.java new file mode 100644 index 0000000000..e246f5f19e --- /dev/null +++ b/src/test/java/com/alibaba/druid/bvt/filter/FilterChainImplTest2.java @@ -0,0 +1,604 @@ +package com.alibaba.druid.bvt.filter; + +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.Types; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.util.JdbcUtils; + +public class FilterChainImplTest2 extends TestCase { + + private DruidDataSource dataSource; + + protected void setUp() throws Exception { + dataSource = new DruidDataSource(); + + dataSource.setUrl("jdbc:mock:xxx"); + dataSource.setFilters("stat"); + + dataSource.init(); + } + + protected void tearDown() throws Exception { + JdbcUtils.close(dataSource); + } + + public void test_getURL() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getURL(1)); + + stmt.close(); + conn.close(); + } + + public void test_getURL_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getURL("1")); + + stmt.close(); + conn.close(); + } + + public void test_getString() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getString(1)); + + stmt.close(); + conn.close(); + } + + public void test_getString_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getString("1")); + + stmt.close(); + conn.close(); + } + + public void test_getBoolean() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertFalse(stmt.getBoolean(1)); + + stmt.close(); + conn.close(); + } + + public void test_getBoolean_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertFalse(stmt.getBoolean("1")); + + stmt.close(); + conn.close(); + } + + + public void test_getByte() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getByte(1)); + + stmt.close(); + conn.close(); + } + + public void test_getByte_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getByte("1")); + + stmt.close(); + conn.close(); + } + + public void test_getShort() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getShort(1)); + + stmt.close(); + conn.close(); + } + + public void test_getShort_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getShort("1")); + + stmt.close(); + conn.close(); + } + + public void test_getInt() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getInt(1)); + + stmt.close(); + conn.close(); + } + + public void test_getInt_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getInt("1")); + + stmt.close(); + conn.close(); + } + + public void test_getLong() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getLong(1)); + + stmt.close(); + conn.close(); + } + + public void test_getLong_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0, stmt.getLong("1")); + + stmt.close(); + conn.close(); + } + + public void test_getFloat() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0F, stmt.getFloat(1)); + + stmt.close(); + conn.close(); + } + + public void test_getFloat_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0F, stmt.getFloat("1")); + + stmt.close(); + conn.close(); + } + + public void test_getDouble() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0D, stmt.getDouble(1)); + + stmt.close(); + conn.close(); + } + + public void test_getDouble_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertEquals(0D, stmt.getDouble("1")); + + stmt.close(); + conn.close(); + } + + + public void test_getBytes() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getBytes(1)); + + stmt.close(); + conn.close(); + } + + public void test_getBytes_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getBytes("1")); + + stmt.close(); + conn.close(); + } + + + public void test_getDate() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getDate(1)); + + stmt.close(); + conn.close(); + } + + public void test_getDate_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getDate("1")); + + stmt.close(); + conn.close(); + } + + public void test_getTime() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTime(1)); + + stmt.close(); + conn.close(); + } + + public void test_getTime_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTime("1")); + + stmt.close(); + conn.close(); + } + + public void test_getTimestamp() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTimestamp(1)); + + stmt.close(); + conn.close(); + } + + public void test_getTimestamp_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTimestamp("1")); + + stmt.close(); + conn.close(); + } + + public void test_getBigDecimal() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getBigDecimal(1)); + + stmt.close(); + conn.close(); + } + + public void test_getBigDecimal_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getBigDecimal("1")); + + stmt.close(); + conn.close(); + } + + public void test_getRef() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getRef(1)); + + stmt.close(); + conn.close(); + } + + public void test_getRef_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getRef("1")); + + stmt.close(); + conn.close(); + } + + public void test_getBlob() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getBlob(1)); + + stmt.close(); + conn.close(); + } + + public void test_getBlob_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getBlob("1")); + + stmt.close(); + conn.close(); + } + + public void test_getArray() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getArray(1)); + + stmt.close(); + conn.close(); + } + + public void test_getArray_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getArray("1")); + + stmt.close(); + conn.close(); + } + + public void test_getDate_2() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getDate(1, null)); + + stmt.close(); + conn.close(); + } + + public void test_getDate_3() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getDate("1", null)); + + stmt.close(); + conn.close(); + } + + public void test_getTime_2() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTime(1, null)); + + stmt.close(); + conn.close(); + } + + public void test_getTime_3() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTime("1", null)); + + stmt.close(); + conn.close(); + } + + public void test_getTimestamp_2() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTimestamp(1, null)); + + stmt.close(); + conn.close(); + } + + public void test_getTimestamp_3() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getTimestamp("1", null)); + + stmt.close(); + conn.close(); + } + + public void test_getRowId() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getRowId(1)); + + stmt.close(); + conn.close(); + } + + public void test_getRowId_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getRowId("1")); + + stmt.close(); + conn.close(); + } + + public void test_getNClob() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getNClob(1)); + + stmt.close(); + conn.close(); + } + + public void test_getNClob_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getNClob("1")); + + stmt.close(); + conn.close(); + } + + public void test_getSQLXML() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getSQLXML(1)); + + stmt.close(); + conn.close(); + } + + public void test_getSQLXML_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getSQLXML("1")); + + stmt.close(); + conn.close(); + } + + public void test_getNString() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getNString(1)); + + stmt.close(); + conn.close(); + } + + public void test_getNString_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getNString("1")); + + stmt.close(); + conn.close(); + } + + public void test_getNCharacterStream() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getNCharacterStream(1)); + + stmt.close(); + conn.close(); + } + + public void test_getNCharacterStream_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getNCharacterStream("1")); + + stmt.close(); + conn.close(); + } + + public void test_getCharacterStream() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getCharacterStream(1)); + + stmt.close(); + conn.close(); + } + + public void test_getCharacterStream_1() throws Exception { + Connection conn = dataSource.getConnection(); + CallableStatement stmt = conn.prepareCall("select ?"); + stmt.registerOutParameter(1, Types.VARCHAR); + + Assert.assertNull(stmt.getCharacterStream("1")); + + stmt.close(); + conn.close(); + } +}