Package net.neoforged.testframework
Interface Test
- All Superinterfaces:
- Groupable
- All Known Subinterfaces:
- DynamicTest
- All Known Implementing Classes:
- AbstractTest,- AbstractTest.Dynamic,- MethodBasedEventTest,- MethodBasedGameTestTest,- MethodBasedTest
The base interface for tests in the TestFramework.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA group of collectors bybus.static enumstatic final recordRepresents the status of a test.static final recordUsed by GUIs in order to display helpful information about tests.
- 
Method SummaryModifier and TypeMethodDescriptiondefault @Nullable GameTestDataReturns the game test version of this test.booleanReturns if this test is enabled by default.groups()A list of the groups of this test.id()Returns the ID of this test.voidinit(TestFramework framework) This method is called when the test is registered to aTestFramework.default Collection<TestListener>Returns the listeners of this test.voidThis method is called when this test is disabled.voidonEnabled(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()Returns the visual information about the test.
- 
Method Details- 
idString id()Returns the ID of this test.- Returns:
- the ID of this test
 
- 
groupsA list of the groups of this test.
 If this list is empty, the test will be only in theungroupedgroup.- Returns:
- the groups of this test
 
- 
enabledByDefaultboolean enabledByDefault()Returns if this test is enabled by default.- Returns:
- if this test is enabled by default
 
- 
onEnabledThis method is called when this test is enabled.- Parameters:
- 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
 
- 
onDisabledvoid onDisabled()This method is called when this test is disabled.
- 
initThis method is called when the test is registered to aTestFramework.- Parameters:
- framework- the framework the test has been registered to
 
- 
visualsTest.Visuals visuals()Returns the visual information about the test.- Returns:
- the visual information about the test
 
- 
resolveAsStreamResolves all tests in this groupable element as aStream.- Specified by:
- resolveAsStreamin interface- Groupable
- Returns:
- all tests as a stream
 
- 
resolveAllResolves all tests in this groupable element.- Specified by:
- resolveAllin interface- Groupable
- Returns:
- all tests
 
- 
asGameTestReturns the game test version of this test.- Returns:
- the game test version of this test
 
- 
listenersReturns the listeners of this test.- Returns:
- the listeners of this test
 
 
-