Interface TestListener


@ParametersAreNonnullByDefault public interface TestListener
A listener which listens for changes in tests.
  • Method Details

    • onStatusChange

      default void onStatusChange(TestFramework framework, Test test, Test.Status oldStatus, Test.Status newStatus, @Nullable Entity changer)
      This method is called when a test changes its status.
      Parameters:
      framework - the framework of the test
      test - the test that changed its status
      oldStatus - the old status of the test
      newStatus - the new status of the test
      changer - the entity that changed the status of the test
    • onEnabled

      default void onEnabled(TestFramework framework, Test test, @Nullable Entity changer)
      This method is called when a test is enabled.
      Parameters:
      framework - the framework of the test
      test - the test that was enabled
      changer - the entity that enabled the test
    • onDisabled

      default void onDisabled(TestFramework framework, Test test, @Nullable Entity changer)
      This method is called when a test is disabled.
      Parameters:
      framework - the framework of the test
      test - the test that was disabled
      changer - the entity that disabled the test
    • instantiate

      @Internal static TestListener instantiate(Class<? extends TestListener> clazz)