Interface CustomExtension

  • All Known Implementing Classes:
    TestContainerExtension

    public interface CustomExtension
    An extension that is invoked before/after all/each tests, depending on whether it is wrapped in a EachCallbackWrapper or AllCallbackWrapper.

    before method will be called in beforeEach or beforeAll. after will be called in afterEach or afterAll.

    Usage example:

    {@code
     public class Test{
          CustomExtension eachCustom = new CustomExtensionImpl1();
          CustomExtension allCustom = new CustomExtensionImpl2();
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void after​(org.junit.jupiter.api.extension.ExtensionContext context)  
      default void before​(org.junit.jupiter.api.extension.ExtensionContext context)  
    • Method Detail

      • before

        default void before​(org.junit.jupiter.api.extension.ExtensionContext context)
                     throws Exception
        Throws:
        Exception
      • after

        default void after​(org.junit.jupiter.api.extension.ExtensionContext context)
                    throws Exception
        Throws:
        Exception