- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Milestone
Description
Michel Zanini opened SPR-9235 and commented
Overview
Since SimpleJdbcTemplate is now deprecated, SimpleJdbcTestUtils should also be deprecated, and its methods could be moved to JdbcTestUtils, changing them to use JdbcTemplate instead.
Proposed Solution
The file attached is a patch where I did this. Also, I added two methods that are very useful for database testing:
- dropTables(): this method is similar to- deleteFromTables()but instead of removing all rows, it will drop the tables.
- countRowsInTable():- countRowsInTable()already exists, but I added this overloaded method that takes a- whereClauseto augment the query.
Affects: 3.1.1
Attachments:
- JdbcTestUtils.java (9.91 kB)
Sub-tasks:
- Backport "Deprecate SimpleJdbcTestUtils in favor of JdbcTestUtils" [SPR-9664] #14298 Backport "Deprecate SimpleJdbcTestUtils in favor of JdbcTestUtils"
Issue Links:
- Introduce countRowsInTableWhere() and dropTables() in abstract transactional base classes in the TestContext framework [SPR-9665] #14299 Introduce countRowsInTableWhere() and dropTables() in abstract transactional base classes in the TestContext framework ("is depended on by")
- Provide JdbcTemplate in abstract transactional base classes in the TestContext framework [SPR-8990] #13630 Provide JdbcTemplate in abstract transactional base classes in the TestContext framework ("is depended on by")
- JdbcTestUtils should not interpret comments as a separate statement [SPR-9593] #14227 JdbcTestUtils should not interpret comments as a separate statement
- Reference Guide still recommends SimpleJdbcTemplate, which is now deprecated [SPR-9345] #13983 Reference Guide still recommends SimpleJdbcTemplate, which is now deprecated
- Deprecate SimpleJdbcTemplate in favor of JdbcTemplate [SPR-6922] #11587 Deprecate SimpleJdbcTemplate in favor of JdbcTemplate
Referenced from: commits d7fd70f, a7d4377, bd0c4b4
3 votes, 5 watchers
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement