类 TestFrameworkImpl.TestsImpl
java.lang.Object
net.neoforged.testframework.impl.TestFrameworkImpl.TestsImpl
- 封闭类:
TestFrameworkImpl
@ParametersAreNonnullByDefault
public final class TestFrameworkImpl.TestsImpl
extends Object
implements MutableTestFramework.MutableTests
-
字段概要
字段修饰符和类型字段说明private final Collection
<Test> private EventListenerGroupImpl.BusSet
private final Map
<String, EventListenerGroupImpl> private final Set
<TestListener> private final Map
<String, Test.Status> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private Group
addGroupToParents
(Group group) void
addListener
(TestListener listener) Adds a global test listener.all()
返回 an unmodifiable view of all the tests registered this this instance。返回 all the registered test groups。Queries a test by its ID.void
Disables a test.void
Enables a test.enabled()
Gets or creates a test group.void
boolean
Checks if a test is enabled.maybeGetGroup
(String id) void
Registers a test to the framework.void
setStatus
(String testId, Test.Status status)
-
字段详细资料
-
tests
-
groups
-
collectors
-
enabled
-
statuses
-
buses
-
globalListeners
-
allView
-
-
构造器详细资料
-
TestsImpl
public TestsImpl()
-
-
方法详细资料
-
addListener
从接口复制的说明:TestFramework.Tests
Adds a global test listener.- 指定者:
addListener
在接口中TestFramework.Tests
- 参数:
listener
- the listener
-
byId
从接口复制的说明:TestFramework.Tests
Queries a test by its ID.- 指定者:
byId
在接口中TestFramework.Tests
- 参数:
id
- the ID of the test to query- 返回:
- the test, if present
-
getOrCreateGroup
从接口复制的说明:TestFramework.Tests
Gets or creates a test group.- 指定者:
getOrCreateGroup
在接口中TestFramework.Tests
- 参数:
id
- the ID of the group- 返回:
- the old group, if one existed, or the new one if a group with that ID did not exist before.
-
maybeGetGroup
-
allGroups
从接口复制的说明:TestFramework.Tests
返回 all the registered test groups。- 指定者:
allGroups
在接口中TestFramework.Tests
- 返回:
- all the registered test groups
-
enable
从接口复制的说明:TestFramework.Tests
Enables a test.
This method only updates the local test.
It will not update clients or the server.
Prefer usingTestFramework.setEnabled(Test, boolean, Entity)
instead.- 指定者:
enable
在接口中TestFramework.Tests
- 参数:
id
- the ID of the test to enable
-
disable
从接口复制的说明:TestFramework.Tests
Disables a test.
This method only updates the local test.
It will not update clients or the server.
Prefer usingTestFramework.setEnabled(Test, boolean, Entity)
instead.- 指定者:
disable
在接口中TestFramework.Tests
- 参数:
id
- the ID of the test to disable
-
isEnabled
从接口复制的说明:TestFramework.Tests
Checks if a test is enabled.- 指定者:
isEnabled
在接口中TestFramework.Tests
- 参数:
id
- the ID of the test to check- 返回:
- if the test is enabled
-
getStatus
- 指定者:
getStatus
在接口中TestFramework.Tests
-
setStatus
- 指定者:
setStatus
在接口中MutableTestFramework.MutableTests
-
register
从接口复制的说明:TestFramework.Tests
Registers a test to the framework.
It is recommended you register tests during mod loading, for proper indexing.- 指定者:
register
在接口中TestFramework.Tests
- 参数:
test
- the test to register
-
addGroupToParents
-
all
从接口复制的说明:TestFramework.Tests
返回 an unmodifiable view of all the tests registered this this instance。- 指定者:
all
在接口中TestFramework.Tests
- 返回:
- an unmodifiable view of all the tests registered this this instance
-
enabled
- 指定者:
enabled
在接口中MutableTestFramework.MutableTests
-
initialiseDefaultEnabledTests
public void initialiseDefaultEnabledTests()
-