接口 Test

所有超级接口:
Groupable
所有已知子接口:
DynamicTest
所有已知实现类:
AbstractTest, AbstractTest.Dynamic, MethodBasedEventTest, MethodBasedGameTestTest, MethodBasedTest

@ParametersAreNonnullByDefault public interface Test extends Groupable
The base interface for tests in the TestFramework.
  • 方法详细资料

    • id

      String id()
      返回 the ID of this test。
      返回:
      the ID of this test
    • groups

      List<String> groups()
      A list of the groups of this test.
      If this list is empty, the test will be only in the ungrouped group.
      返回:
      the groups of this test
    • enabledByDefault

      boolean enabledByDefault()
      返回 if this test is enabled by default。
      返回:
      if this test is enabled by default
    • onEnabled

      void onEnabled(Test.EventListenerGroup buses)
      This method is called when this test is enabled.
      参数:
      buses - a collector for event listeners. Prefer using this listener instead of the casual IEventBus.addListener(Consumer) or IEventBus.register(Object), as the collector will automatically unregister listeners when the test is disabled
    • onDisabled

      void onDisabled()
      This method is called when this test is disabled.
    • init

      void init(TestFramework framework)
      This method is called when the test is registered to a TestFramework.
      参数:
      framework - the framework the test has been registered to
    • visuals

      Test.Visuals visuals()
      返回 the visual information about the test。
      返回:
      the visual information about the test
    • resolveAsStream

      default Stream<Test> resolveAsStream()
      Resolves all tests in this groupable element as a Stream.
      指定者:
      resolveAsStream 在接口中 Groupable
      返回:
      all tests as a stream
    • resolveAll

      default List<Test> resolveAll()
      Resolves all tests in this groupable element.
      指定者:
      resolveAll 在接口中 Groupable
      返回:
      all tests
    • asGameTest

      @Nullable default @Nullable GameTestData asGameTest()
      返回 the game test version of this test。
      返回:
      the game test version of this test
    • listeners

      default Collection<TestListener> listeners()
      返回 the listeners of this test。
      返回:
      the listeners of this test