接口 Test
- 所有超级接口:
Groupable
- 所有已知子接口:
DynamicTest
- 所有已知实现类:
AbstractTest
,AbstractTest.Dynamic
,MethodBasedEventTest
,MethodBasedGameTestTest
,MethodBasedTest
The base interface for tests in the TestFramework.
-
嵌套类概要
嵌套类修饰符和类型接口说明static interface
A group of collectors by bus.static enum
static final record
Represents the status of a test.static final record
Used by GUIs in order to display helpful information about tests. -
方法概要
修饰符和类型方法说明default @Nullable GameTestData
返回 the game test version of this test。boolean
返回 if this test is enabled by default。groups()
A list of the groups of this test.id()
返回 the ID of this test。void
init
(TestFramework framework) This method is called when the test is registered to aTestFramework
.default Collection
<TestListener> 返回 the listeners of this test。void
This method is called when this test is disabled.void
onEnabled
(Test.EventListenerGroup buses) This method is called when this test is enabled.Resolves all tests in this groupable element.Resolves all tests in this groupable element as aStream
.visuals()
返回 the visual information about the test。
-
方法详细资料
-
id
String id()返回 the ID of this test。- 返回:
- the ID of this test
-
groups
A list of the groups of this test.
If this list is empty, the test will be only in theungrouped
group.- 返回:
- the groups of this test
-
enabledByDefault
boolean enabledByDefault()返回 if this test is enabled by default。- 返回:
- if this test is enabled by default
-
onEnabled
This method is called when this test is enabled.- 参数:
buses
- a collector for event listeners. Prefer using this listener instead of the casualIEventBus.addListener(Consumer)
orIEventBus.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
This method is called when the test is registered to aTestFramework
.- 参数:
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
Resolves all tests in this groupable element as aStream
.- 指定者:
resolveAsStream
在接口中Groupable
- 返回:
- all tests as a stream
-
resolveAll
Resolves all tests in this groupable element.- 指定者:
resolveAll
在接口中Groupable
- 返回:
- all tests
-
asGameTest
返回 the game test version of this test。- 返回:
- the game test version of this test
-
listeners
返回 the listeners of this test。- 返回:
- the listeners of this test
-