|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.springframework.test.context.testng
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 integratesthethe Spring TestContext Framework withexplicitexplicit ApplicationContext testing support in a TestNG environment.
Concrete subclasses:@author Sam Brannen @author Juergen Hoeller @since 2.5 @see TestContext @see TestContextManager @see TestExecutionListeners @see AbstractTransactionalTestNGSpringContextTests @see org.springframework.test.context.
- Typically declare a class-level @ContextConfiguration annotation to configure
thethe application contextresource locations.or annotated classes. If yourtesttest does not need to load an application context, you maychoosechoose to omitthethe @ContextConfigurationdeclarationdeclaration andtoto configure the appropriate TestExecutionListeners manually.- Must have constructors which either implicitly or explicitly delegate to {@code super();}.
junit38.AbstractJUnit38SpringContextTests @see org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
Class AbstractTransactionalTestNGSpringContextTests, int deleteFromTables(String[])Abstract Transactional 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 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 AbstractTestNGSpringContextTests.@author Sam Brannen @author Juergen Hoeller @since 2.5 @see AbstractTestNGSpringContextTests @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.jdbccontext.SimpleJdbcTestUtilstransaction.BeforeTransaction @see org.springframework.test.context.junit38transaction.AfterTransaction @see org.springframework.test.jdbc.AbstractTransactionalJUnit38SpringContextTestsJdbcTestUtils @see org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests
Convenience method for deleting all rows from the specified tables.Class AbstractTransactionalTestNGSpringContextTests, void executeSqlScript(String, boolean)UseUse with caution outside of a transaction! @param names the names of the tables from which to delete @return the total number of rows deleted from all specified tables
Execute the given SQL script. Use with caution outside of a transaction!Class AbstractTransactionalTestNGSpringContextTests, void setDataSource(DataSource)The script will normally be loaded by classpath. There should be
one statementone statement per line. Any semicolons will be removed. Do not usethisthis method toexecuteexecute DDL if you expect rollback. @param sqlResourcePath the Spring resource path for the SQL script @param continueOnError whether or not to continue without throwing an exception in the event of an error @throws DataAccessException if there is an error executing a statement and continueOnError wasfalse
Set the {@code DataSource}, typically provided via Dependency Injection.Class AbstractTransactionalTestNGSpringContextTests, SimpleJdbcTemplate simpleJdbcTemplate@paramThis
dataSourcemethod also instantiates theDataSource.simpleJdbcTemplate and .jdbcTemplatetoinstanceinjectvariables.
The {@code SimpleJdbcTemplate} that this base class manages, available to subclasses. @deprecated As of Spring 3.2, use .jdbcTemplate instead.