接口 TestListener
@ParametersAreNonnullByDefault
public interface TestListener
A listener which listens for changes in tests.
-
方法概要
修饰符和类型方法说明static TestListener
instantiate
(Class<? extends TestListener> clazz) default void
onDisabled
(TestFramework framework, Test test, @Nullable Entity changer) This method is called when a test is disabled.default void
onEnabled
(TestFramework framework, Test test, @Nullable Entity changer) This method is called when a test is enabled.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.
-
方法详细资料
-
onStatusChange
default void onStatusChange(TestFramework framework, Test test, Test.Status oldStatus, Test.Status newStatus, @Nullable @Nullable Entity changer) This method is called when a test changes its status.- 参数:
framework
- the framework of the testtest
- the test that changed its statusoldStatus
- the old status of the testnewStatus
- the new status of the testchanger
- the entity that changed the status of the test
-
onEnabled
This method is called when a test is enabled.- 参数:
framework
- the framework of the testtest
- the test that was enabledchanger
- the entity that enabled the test
-
onDisabled
This method is called when a test is disabled.- 参数:
framework
- the framework of the testtest
- the test that was disabledchanger
- the entity that disabled the test
-
instantiate
-