@EachBean(value=SynchronousTransactionManager.class) @Requires(classes=io.micronaut.test.context.TestExecutionListener.class) @Requires(property="micronaut.test.transactional",value="true",defaultValue="true") @Replaces(value=io.micronaut.spring.tx.test.SpringTransactionTestExecutionListener.class) @Internal public class DefaultTestTransactionExecutionListener extends java.lang.Object implements io.micronaut.test.context.TestExecutionListener
Modifier | Constructor and Description |
---|---|
protected |
DefaultTestTransactionExecutionListener(SynchronousTransactionManager<java.lang.Object> transactionManager,
boolean rollback,
io.micronaut.test.annotation.TransactionMode transactionMode) |
Modifier and Type | Method and Description |
---|---|
void |
afterCleanupTest(io.micronaut.test.context.TestContext testContext) |
void |
afterSetupTest(io.micronaut.test.context.TestContext testContext) |
void |
afterTestExecution(io.micronaut.test.context.TestContext testContext) |
void |
beforeCleanupTest(io.micronaut.test.context.TestContext testContext) |
void |
beforeSetupTest(io.micronaut.test.context.TestContext testContext) |
void |
beforeTestExecution(io.micronaut.test.context.TestContext testContext) |
protected DefaultTestTransactionExecutionListener(SynchronousTransactionManager<java.lang.Object> transactionManager, @Property(name="micronaut.test.rollback",defaultValue="true") boolean rollback, @Property(name="micronaut.test.transaction-mode",defaultValue="SEPARATE_TRANSACTIONS") io.micronaut.test.annotation.TransactionMode transactionMode)
transactionManager
- Spring's PlatformTransactionManager
rollback
- true
if the transaction should be rollbacktransactionMode
- The transaction modepublic void beforeSetupTest(io.micronaut.test.context.TestContext testContext)
beforeSetupTest
in interface io.micronaut.test.context.TestExecutionListener
public void afterSetupTest(io.micronaut.test.context.TestContext testContext)
afterSetupTest
in interface io.micronaut.test.context.TestExecutionListener
public void beforeCleanupTest(io.micronaut.test.context.TestContext testContext)
beforeCleanupTest
in interface io.micronaut.test.context.TestExecutionListener
public void afterCleanupTest(io.micronaut.test.context.TestContext testContext)
afterCleanupTest
in interface io.micronaut.test.context.TestExecutionListener
public void afterTestExecution(io.micronaut.test.context.TestContext testContext)
afterTestExecution
in interface io.micronaut.test.context.TestExecutionListener
public void beforeTestExecution(io.micronaut.test.context.TestContext testContext)
beforeTestExecution
in interface io.micronaut.test.context.TestExecutionListener