Class AbstractTransactionalTestNGSpringContextTests

java.lang.Object
org.springframework.test.context.testng.AbstractTestNGSpringContextTests
org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests
All Implemented Interfaces:
Aware, ApplicationContextAware, org.testng.IHookable, org.testng.ITestNGListener

@Transactional public abstract class AbstractTransactionalTestNGSpringContextTests extends AbstractTestNGSpringContextTests
Abstract transactional extension of AbstractTestNGSpringContextTests 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 AbstractTestNGSpringContextTests.

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