Class BMUnit5AbstractHandler<A extends Annotation>

java.lang.Object
org.jboss.byteman.contrib.bmunit.BMUnit5AbstractHandler<A>
Type Parameters:
A - The BMUnit annotation class.
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension
Direct Known Subclasses:
BMUnit5ConfigHandler, BMUnit5MultiRuleHandler, BMUnit5MultiScriptHandler, BMUnit5SingleRuleHandler, BMUnit5SingleScriptHandler

public abstract class BMUnit5AbstractHandler<A extends Annotation> extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
Base class for wiring Byteman BMUnit annotations to the test engine's lifecycle hooks.
  • Field Details

  • Constructor Details

    • BMUnit5AbstractHandler

      protected BMUnit5AbstractHandler(Class<A> annotationClass)
  • Method Details

    • getAnnotationClass

      public Class<A> getAnnotationClass()
    • beforeAll

      public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
      Throws:
      Exception
    • beforeEach

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

      protected abstract void install(Class<?> testClass, Method testMethod, A annotation) throws Exception
      Throws:
      Exception
    • afterAll

      public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
      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
    • uninstall

      protected abstract void uninstall(Class<?> testClass, Method testMethod, A annotation) throws Exception
      Throws:
      Exception