|
|
|
@ -211,9 +211,8 @@ public class SqlUpdateTests {
@@ -211,9 +211,8 @@ public class SqlUpdateTests {
|
|
|
|
|
given(resultSet.getObject(1)).willReturn(11); |
|
|
|
|
given(preparedStatement.executeUpdate()).willReturn(1); |
|
|
|
|
given(preparedStatement.getGeneratedKeys()).willReturn(resultSet); |
|
|
|
|
given(connection.prepareStatement(INSERT_GENERATE_KEYS, |
|
|
|
|
PreparedStatement.RETURN_GENERATED_KEYS) |
|
|
|
|
).willReturn(preparedStatement); |
|
|
|
|
given(connection.prepareStatement(INSERT_GENERATE_KEYS, PreparedStatement.RETURN_GENERATED_KEYS)) |
|
|
|
|
.willReturn(preparedStatement); |
|
|
|
|
|
|
|
|
|
GeneratedKeysUpdater pc = new GeneratedKeysUpdater(); |
|
|
|
|
KeyHolder generatedKeyHolder = new GeneratedKeyHolder(); |
|
|
|
@ -294,6 +293,7 @@ public class SqlUpdateTests {
@@ -294,6 +293,7 @@ public class SqlUpdateTests {
|
|
|
|
|
pc::run); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private class Updater extends SqlUpdate { |
|
|
|
|
|
|
|
|
|
public Updater() { |
|
|
|
|