Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 58102 invoked from network); 2 Nov 2003 17:46:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Nov 2003 17:46:17 -0000 Received: (qmail 42186 invoked by uid 500); 2 Nov 2003 17:46:06 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 42106 invoked by uid 500); 2 Nov 2003 17:46:06 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 42093 invoked by uid 500); 2 Nov 2003 17:46:06 -0000 Received: (qmail 42090 invoked from network); 2 Nov 2003 17:46:06 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 2 Nov 2003 17:46:06 -0000 Received: (qmail 58073 invoked by uid 1340); 2 Nov 2003 17:46:12 -0000 Date: 2 Nov 2003 17:46:12 -0000 Message-ID: <20031102174612.58072.qmail@minotaur.apache.org> From: dirkv@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp TesterStatement.java TesterResultSet.java TesterPreparedStatement.java TesterConnection.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N dirkv 2003/11/02 09:46:12 Modified: dbcp/src/test/org/apache/commons/dbcp TesterStatement.java TesterResultSet.java TesterPreparedStatement.java TesterConnection.java Log: support for resultSetType, resultSetConcurrency in junit tests Revision Changes Path 1.12 +10 -3 jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterStatement.java Index: TesterStatement.java =================================================================== RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterStatement.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- TesterStatement.java 15 Oct 2003 19:52:13 -0000 1.11 +++ TesterStatement.java 2 Nov 2003 17:46:12 -0000 1.12 @@ -78,6 +78,13 @@ public TesterStatement(Connection conn) { _connection = conn; } + + public TesterStatement(Connection conn, int resultSetType, int resultSetConcurrency) { + _connection = conn; + _resultSetType = resultSetType; + _resultSetConcurrency = resultSetConcurrency; + } + protected Connection _connection = null; protected boolean _open = true; protected int _rowsUpdated = 1; 1.9 +15 -5 jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterResultSet.java Index: TesterResultSet.java =================================================================== RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterResultSet.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- TesterResultSet.java 15 Oct 2003 19:53:30 -0000 1.8 +++ TesterResultSet.java 2 Nov 2003 17:46:12 -0000 1.9 @@ -90,6 +90,16 @@ _data = data; } + public TesterResultSet(Statement stmt, Object[][] data, int type, int concurrency) { + _statement = stmt; + _data = data; + _type = type; + _concurrency = concurrency; + } + + protected int _type = ResultSet.TYPE_FORWARD_ONLY; + protected int _concurrency = ResultSet.CONCUR_READ_ONLY; + protected Object[][] _data = null; protected int _currentRow = -1; @@ -423,11 +433,11 @@ } public int getType() throws SQLException { - return 1003; + return this._type; } public int getConcurrency() throws SQLException { - return 1007; + return this._concurrency; } public boolean rowUpdated() throws SQLException { 1.10 +10 -5 jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterPreparedStatement.java Index: TesterPreparedStatement.java =================================================================== RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterPreparedStatement.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- TesterPreparedStatement.java 15 Oct 2003 19:53:30 -0000 1.9 +++ TesterPreparedStatement.java 2 Nov 2003 17:46:12 -0000 1.10 @@ -93,12 +93,17 @@ _sql = sql; } + public TesterPreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency) { + super(conn, resultSetType, resultSetConcurrency); + _sql = sql; + } + public ResultSet executeQuery(String sql) throws SQLException { checkOpen(); if("null".equals(sql)) { return null; } else { - return new TesterResultSet(this); + return new TesterResultSet(this, null, _resultSetType, _resultSetConcurrency); } } @@ -112,7 +117,7 @@ if("null".equals(_sql)) { return null; } else { - return new TesterResultSet(this); + return new TesterResultSet(this, null, _resultSetType, _resultSetConcurrency); } } 1.10 +4 -4 jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterConnection.java Index: TesterConnection.java =================================================================== RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterConnection.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- TesterConnection.java 15 Oct 2003 19:53:30 -0000 1.9 +++ TesterConnection.java 2 Nov 2003 17:46:12 -0000 1.10 @@ -190,7 +190,7 @@ public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { checkOpen(); - return new TesterPreparedStatement(this, sql); + return new TesterPreparedStatement(this, sql, resultSetType, resultSetConcurrency); } public void rollback() throws SQLException { --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org