use of com.alibaba.druid.mock.MockResultSet in project druid by alibaba.
the class FilterChainTest_ResultSet method setUp.
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
statement = new StatementProxyImpl(null, null, 1);
mockResultSet = new MockResultSet(null) {
public Object getObject(int columnIndex) throws SQLException {
invokeCount++;
return new MockResultSet(null);
}
};
}
use of com.alibaba.druid.mock.MockResultSet in project druid by alibaba.
the class DruidPooledResultSetTest2 method testWrap.
public void testWrap() throws Exception {
String sql = "select ?";
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setString(1, "xxx");
ResultSet rs = stmt.executeQuery();
ResultSet raw = rs.unwrap(ResultSet.class);
Assert.assertTrue(raw instanceof MockResultSet);
rs.close();
conn.close();
}
Aggregations