I'm trying to test a DAO class to "insert" using the
CommonMockPreparedStatement class. The problem that I'm running into is
that one of the expected values needed for the prepared statement isn't
known until after the DAO insert method returns (the primary key). When
my DAO code calls the setInteger method on the prepared statement it
fails immeadately because its being checked immediately. What I think I
want to do is to call setFailOnVerify but this method is on the
ExpectationSet mySetParameters which is private inside the
CommonMockPreparedStatement.
Does anyone have a workaround?
Re:'s
TJS
|