@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.test.transaction.spring.SpringTransactionTestExecutionListener.class) @Internal public class DefaultTestTransactionExecutionListener extends java.lang.Object implements io.micronaut.test.context.TestExecutionListener
io.micronaut.test.annotation.MicronautTest#transactional()
handling.Modifier | Constructor and Description |
---|---|
protected |
DefaultTestTransactionExecutionListener(SynchronousTransactionManager<java.lang.Object> transactionManager,
boolean rollback) |
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)
transactionManager
- Spring's PlatformTransactionManager
rollback
- true
if the transaction should be rollbackpublic 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