enhance mock

This commit is contained in:
wenshao
2011-12-07 11:07:58 +08:00
parent 83c4cfa8e7
commit 2d91292d3a
@@ -174,6 +174,10 @@ public class MockPreparedStatement extends MockStatement implements PreparedStat
if (closed) {
throw new SQLException();
}
if (this.mockConnection != null && this.mockConnection.isClosed()) {
throw new SQLException("No operations allowed after connection closed.");
}
parameters.clear();
}