Update of /cvsroot/mockobjects/mockobjects-java/src/jdk/common/com/mockobjects/sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29361/src/jdk/common/com/mockobjects/sql
Modified Files:
CommonMockConnection.java
Log Message:
Make statement a ReturnValue
Index: CommonMockConnection.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/jdk/common/com/mockobjects/sql/CommonMockConnection.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- CommonMockConnection.java 21 Aug 2003 21:14:54 -0000 1.8
+++ CommonMockConnection.java 18 May 2004 13:34:29 -0000 1.9
@@ -119,7 +119,7 @@
private final ExpectationCounter myRollbackCalls;
- private Statement myStatement;
+ private final ReturnValue statement = new ReturnValue("statement");
private SQLException myStatementException = null;
@@ -272,7 +272,7 @@
* Pass the Statement instance for use with tests.
*/
public void setupStatement(Statement statement) {
- myStatement = statement;
+ this.statement.setValue(statement);
}
/**
@@ -328,7 +328,7 @@
public Statement createStatement() throws SQLException {
myCreateStatementCalls.inc();
throwStatementExceptionIfAny();
- return myStatement;
+ return (Statement)statement.getValue();
}
/**
@@ -400,7 +400,7 @@
myResultSetType.setActual(resultSetType);
myResultSetConcurrency.setActual(resultSetConcurrency);
- return myStatement;
+ return (Statement)statement.getValue();
}
public boolean getAutoCommit() throws SQLException {
|