Class DefaultTestTransactionMethodInterceptor<T>

  • Type Parameters:
    T - The result type
    All Implemented Interfaces:
    io.micronaut.test.context.TestMethodInterceptor<T>

    @EachBean(SynchronousTransactionManager.class)
    @Requires(classes=io.micronaut.test.context.TestExecutionListener.class) @Requires(property="micronaut.test.transactional",value="true",defaultValue="true")
    @Internal
    public final class DefaultTestTransactionMethodInterceptor<T>
    extends java.lang.Object
    implements io.micronaut.test.context.TestMethodInterceptor<T>
    Adds a transaction surrounding the test method.
    Since:
    3.5.0
    Author:
    Denis Stepanov
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T interceptAfterEach​(io.micronaut.test.context.TestMethodInvocationContext<T> context)  
      T interceptBeforeEach​(io.micronaut.test.context.TestMethodInvocationContext<T> context)  
      T interceptTest​(io.micronaut.test.context.TestMethodInvocationContext<T> context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • interceptBeforeEach

        public T interceptBeforeEach​(io.micronaut.test.context.TestMethodInvocationContext<T> context)
        Specified by:
        interceptBeforeEach in interface io.micronaut.test.context.TestMethodInterceptor<T>
      • interceptTest

        public T interceptTest​(io.micronaut.test.context.TestMethodInvocationContext<T> context)
        Specified by:
        interceptTest in interface io.micronaut.test.context.TestMethodInterceptor<T>
      • interceptAfterEach

        public T interceptAfterEach​(io.micronaut.test.context.TestMethodInvocationContext<T> context)
        Specified by:
        interceptAfterEach in interface io.micronaut.test.context.TestMethodInterceptor<T>