Abstract {@link Transactional transactional} extension of{@link AbstractJUnit4SpringContextTests} which adds convenience functionalityfor JDBC access. Expects a {@link DataSource} bean and a{@link PlatformTransactionManager} bean to be defined in the Spring{@link ApplicationContext application context}.
This class exposes a {@link SimpleJdbcTemplate} and provides an easy way to{@link #countRowsInTable(String) count the number of rows in a table} ,{@link #deleteFromTables(String) delete from the database} , and{@link #executeSqlScript(String,boolean) execute SQL scripts} within atransaction.
Concrete subclasses must fulfill the same requirements outlined in {@link AbstractJUnit4SpringContextTests}.
Note: this class serves only as a convenience for extension. If you do not wish for your test classes to be tied to a Spring-specific class hierarchy, you may configure your own custom test classes by using {@link SpringJUnit4ClassRunner}, {@link ContextConfiguration @ContextConfiguration}, {@link TestExecutionListeners @TestExecutionListeners}, {@link Transactional @Transactional}, etc.
@author Sam Brannen
@author Juergen Hoeller
@since 2.5
@see AbstractJUnit4SpringContextTests
@see org.springframework.test.context.ContextConfiguration
@see org.springframework.test.context.TestExecutionListeners
@see org.springframework.test.context.transaction.TransactionalTestExecutionListener
@see org.springframework.test.context.transaction.TransactionConfiguration
@see org.springframework.transaction.annotation.Transactional
@see org.springframework.test.annotation.NotTransactional
@see org.springframework.test.annotation.Rollback
@see org.springframework.test.context.transaction.BeforeTransaction
@see org.springframework.test.context.transaction.AfterTransaction
@see org.springframework.test.jdbc.SimpleJdbcTestUtils
@see org.springframework.test.context.junit38.AbstractTransactionalJUnit38SpringContextTests
@see org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests