Steve,
Why isn't there a MockConnection.setExpectedPrepareStatementString() in
com.mockobjects.sql.MockConnection (as in your jdbc test first paper) ?
I think it would be needed; otherwise, I have no way of checking the correct
query string is correctly passed to the statement.
My test code :
statement.setExpectedQueryString("some SQL query");
statement.setExpectedExecuteCalls(1);
statement.setExpectingNoSetParameters();
My code under test :
PreparedStatement statement =
this.connection.prepareStatement(query);
ResultSet rs = statement.executeQuery();
Thanks
-Vincent
|