Class AbstractTransactionalJUnit4SpringContextTests

java.lang.Object
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests
All Implemented Interfaces:
Aware, ApplicationContextAware

@Transactional @Deprecated(since="7.0") public abstract class AbstractTransactionalJUnit4SpringContextTests extends AbstractJUnit4SpringContextTests
Deprecated.
since Spring Framework 7.0 in favor of the SpringExtension and JUnit Jupiter
Abstract transactional extension of AbstractJUnit4SpringContextTests which adds convenience functionality for JDBC access. Expects a DataSource bean and a PlatformTransactionManager bean to be defined in the Spring application context.

This class exposes a JdbcTemplate and provides an easy way to count the number of rows in a table (potentially with a WHERE clause), delete from tables, drop tables, and execute SQL scripts within a transaction.

Concrete subclasses must fulfill the same requirements outlined in AbstractJUnit4SpringContextTests.

This class serves only as a convenience for extension.

NOTE: This class requires JUnit 4.12 or higher.

Since:
2.5
Author:
Sam Brannen, Juergen Hoeller
See Also: