Class TestResourcesScopeListener

java.lang.Object
io.micronaut.test.extensions.junit5.TestResourcesScopeListener
All Implemented Interfaces:
org.junit.platform.launcher.TestExecutionListener

public class TestResourcesScopeListener extends Object implements org.junit.platform.launcher.TestExecutionListener
A listener which is responsible for shutting down test resources for a particular scope once the last test which uses this scope is finished.
  • Constructor Details

    • TestResourcesScopeListener

      public TestResourcesScopeListener()
  • Method Details

    • testPlanExecutionStarted

      public void testPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan)
      Specified by:
      testPlanExecutionStarted in interface org.junit.platform.launcher.TestExecutionListener
    • executionStarted

      public void executionStarted(org.junit.platform.launcher.TestIdentifier id)
      Specified by:
      executionStarted in interface org.junit.platform.launcher.TestExecutionListener
    • executionFinished

      public void executionFinished(org.junit.platform.launcher.TestIdentifier id, org.junit.platform.engine.TestExecutionResult testExecutionResult)
      Specified by:
      executionFinished in interface org.junit.platform.launcher.TestExecutionListener
    • findTestResourceScopeAnnotation

      public static Optional<TestResourcesScope> findTestResourceScopeAnnotation(Class<?> clazz)