|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.springframework.test.context.junit4
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
Abstract base test class which integrates the Spring TestContext Framework with explicit ApplicationContext testing support in a JUnit 4.5+ environment.
Concrete subclasses should typically declare a class-level @ContextConfiguration annotation to configure the application contextresource locations or annotated classes.If your test doesnotnot need to load an application context, you maychoosechoose to omit the @ContextConfigurationdeclarationdeclaration and toconfigureconfigure theappropriateappropriate TestExecutionListenersmanually.
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 SpringJUnit4ClassRunner, @ContextConfiguration, @TestExecutionListeners, etc.@author Sam Brannen @since 2.5 @see ContextConfiguration @see TestContext @see TestContextManager @see AbstractTransactionalJUnit4SpringContextTests @see org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests @see org.springframework.test.context.testng.AbstractTestNGSpringContextTests
Class AbstractTransactionalJUnit4SpringContextTests, void setDataSource(DataSource)Abstract Transactional 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 ApplicationContext application context.
This class exposes aSimpleJdbcTemplateJdbcTemplate and provides an easy way to #countRowsInTable count the number of rows in a table (potentially #countRowsInTableWhere with a WHERE clause), #deleteFromTables delete fromthe databasetables, #dropTables drop tables, and #executeSqlScript execute SQL scripts withinaa transaction.
Concrete subclasses must fulfill the same requirements outlined in 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 SpringJUnit4ClassRunner, @ContextConfiguration, @TestExecutionListeners, @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.AbstractTransactionalJUnit38SpringContextTestsJdbcTestUtils @see org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests
Set the {@code DataSource}, typically provided via Dependency Injection.Class AbstractTransactionalJUnit4SpringContextTests, SimpleJdbcTemplate simpleJdbcTemplateThis method also instantiates the .simpleJdbcTemplate and .jdbcTemplate instance variables.
The {@code SimpleJdbcTemplate} that this base class manages, available to subclasses. @deprecated As of Spring 3.2, use .jdbcTemplate instead.