abstract class TestContextTransactionUtils
Utility methods for working with transactions and data access related beans within the Spring TestContext Framework.
Mainly for internal use within the framework.
Author
Sam Brannen
Author
Juergen Hoeller
Since
4.1
static val DEFAULT_DATA_SOURCE_NAME: String
Default bean name for a DataSource: |
|
static val DEFAULT_TRANSACTION_MANAGER_NAME: String
Default bean name for a PlatformTransactionManager: |
open static fun createDelegatingTransactionAttribute(testContext: TestContext, targetAttribute: TransactionAttribute): TransactionAttribute
Create a delegating TransactionAttribute for the supplied target TransactionAttribute and TestContext, using the names of the test class and test method to build the name of the transaction. |
|
open static fun retrieveDataSource(testContext: TestContext, name: String): DataSource
Retrieve the DataSource to use for the supplied TestContext. The following algorithm is used to retrieve the
|
|
open static fun retrieveTransactionManager(testContext: TestContext, name: String): PlatformTransactionManager
Retrieve the PlatformTransactionManager to use for the supplied TestContext. The following algorithm is used to retrieve the transaction manager from the org.springframework.context.ApplicationContext of the supplied test context:
|