Class TestSupportExtension

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.AfterTestExecutionCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.BeforeTestExecutionCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestInstancePostProcessor

    public class TestSupportExtension
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.TestInstancePostProcessor, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.BeforeTestExecutionCallback, org.junit.jupiter.api.extension.AfterTestExecutionCallback, org.junit.jupiter.api.extension.AfterEachCallback
    Extension for TestSupport.
    Author:
    Daniel Sagenschneider
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void afterTestExecution​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)
      ========================= Extension Lifecycle ===============================
      void beforeTestExecution​(org.junit.jupiter.api.extension.ExtensionContext context)  
      static <T extends TestSupport>
      T
      getTestSupport​(java.lang.Class<T> testSupportType, org.junit.jupiter.api.extension.ExtensionContext context)
      Obtains the particular TestSupport.
      void postProcessTestInstance​(java.lang.Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context)  
      • Methods inherited from class java.lang.Object

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

      • TestSupportExtension

        public TestSupportExtension()
    • Method Detail

      • getTestSupport

        public static <T extends TestSupport> T getTestSupport​(java.lang.Class<T> testSupportType,
                                                               org.junit.jupiter.api.extension.ExtensionContext context)
        Obtains the particular TestSupport.
        Type Parameters:
        T - TestSupport type.
        Parameters:
        testSupportType - TestSupport type.
        context - ExtensionContext.
        Returns:
        Particular TestSupport.
      • postProcessTestInstance

        public void postProcessTestInstance​(java.lang.Object testInstance,
                                            org.junit.jupiter.api.extension.ExtensionContext context)
                                     throws java.lang.Exception
        Specified by:
        postProcessTestInstance in interface org.junit.jupiter.api.extension.TestInstancePostProcessor
        Throws:
        java.lang.Exception
      • beforeEach

        public void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)
                        throws java.lang.Exception
        ========================= Extension Lifecycle ===============================
        Specified by:
        beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
        Throws:
        java.lang.Exception
      • beforeTestExecution

        public void beforeTestExecution​(org.junit.jupiter.api.extension.ExtensionContext context)
                                 throws java.lang.Exception
        Specified by:
        beforeTestExecution in interface org.junit.jupiter.api.extension.BeforeTestExecutionCallback
        Throws:
        java.lang.Exception
      • afterTestExecution

        public void afterTestExecution​(org.junit.jupiter.api.extension.ExtensionContext context)
                                throws java.lang.Exception
        Specified by:
        afterTestExecution in interface org.junit.jupiter.api.extension.AfterTestExecutionCallback
        Throws:
        java.lang.Exception
      • afterEach

        public void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)
                       throws java.lang.Exception
        Specified by:
        afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
        Throws:
        java.lang.Exception