Package net.neoforged.testframework
Interface TestFramework.Tests
- All Known Subinterfaces:
- MutableTestFramework.MutableTests
- All Known Implementing Classes:
- TestFrameworkImpl.TestsImpl
- Enclosing interface:
- TestFramework
@ParametersAreNonnullByDefault
public static interface TestFramework.Tests
Interface used for accessing a framework's tests.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddListener(TestListener listener) Adds a global test listener.@UnmodifiableView Collection<Test>all()Returns an unmodifiable view of all the tests registered this this instance.Returns all the registered test groups.Queries a test by its ID.voidDisables a test.voidEnables a test.Gets or creates a test group.booleanChecks if a test is enabled.voidRegisters a test to the framework.
- 
Method Details- 
byIdQueries a test by its ID.- Parameters:
- id- the ID of the test to query
- Returns:
- the test, if present
 
- 
getOrCreateGroupGets or creates a test group.- Parameters:
- id- the ID of the group
- Returns:
- the old group, if one existed, or the new one if a group with that ID did not exist before.
 
- 
allGroupsCollection<Group> allGroups()Returns all the registered test groups.- Returns:
- all the registered test groups
 
- 
enableEnables a test.
 
 This method only updates the local test.
 It will not update clients or the server.
 Prefer usingTestFramework.setEnabled(Test, boolean, Entity)instead.- Parameters:
- id- the ID of the test to enable
 
- 
disableDisables a test.
 
 This method only updates the local test.
 It will not update clients or the server.
 Prefer usingTestFramework.setEnabled(Test, boolean, Entity)instead.- Parameters:
- id- the ID of the test to disable
 
- 
isEnabledChecks if a test is enabled.- Parameters:
- id- the ID of the test to check
- Returns:
- if the test is enabled
 
- 
getStatus
- 
registerRegisters a test to the framework.
 It is recommended you register tests during mod loading, for proper indexing.- Parameters:
- test- the test to register
 
- 
all@UnmodifiableView Collection<Test> all()Returns an unmodifiable view of all the tests registered this this instance.- Returns:
- an unmodifiable view of all the tests registered this this instance
 
- 
addListenerAdds a global test listener.- Parameters:
- listener- the listener
 
 
-