Class TestSupportExtension

java.lang.Object
net.officefloor.frame.test.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, org.junit.jupiter.api.extension.TestInstantiationAwareExtension

public class TestSupportExtension extends 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
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension

    org.junit.jupiter.api.extension.TestInstantiationAwareExtension.ExtensionContextScope
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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(Class<T> testSupportType, org.junit.jupiter.api.extension.ExtensionContext context)
    Obtains the particular TestSupport.
    void
    postProcessTestInstance(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

    Methods inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension

    getTestInstantiationExtensionContextScope
  • Constructor Details

    • TestSupportExtension

      public TestSupportExtension()
  • Method Details

    • getTestSupport

      public static <T extends TestSupport> T getTestSupport(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(Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      postProcessTestInstance in interface org.junit.jupiter.api.extension.TestInstancePostProcessor
      Throws:
      Exception
    • beforeEach

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

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

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

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