Class AbstractTest
java.lang.Object
net.neoforged.testframework.impl.test.AbstractTest
- Direct Known Subclasses:
AbstractTest.Dynamic
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfacestatic classNested classes/interfaces inherited from interface net.neoforged.testframework.Test
Test.EventListenerGroup, Test.Result, Test.Status, Test.Visuals -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected TestFrameworkprotected @Nullable GameTestDataprotected Stringprotected final Set<TestListener> protected Test.Visuals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable GameTestDataReturns the game test version of this test.protected final voidprotected final voidconfigureGameTest(@Nullable GameTest gameTest, @Nullable EmptyTemplate template) voidenable()booleanReturns if this test is enabled by default.protected voidprotected StringgameTestTemplate(GameTest gameTest) 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.booleanReturns the listeners of this test.org.slf4j.Loggerlogger()voidThis method is called when this test is disabled.voidonEnabled(Test.EventListenerGroup buses) This method is called when this test is enabled.protected voidonGameTest(GameTestHelper helper) protected voidpass()final voidrequestConfirmation(Player player, Component message) status()voidupdateStatus(Test.Status status, @Nullable Entity changer) visuals()Returns the visual information about the test.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.testframework.Test
resolveAll, resolveAsStream
-
Field Details
-
framework
-
id
-
groups
-
enabledByDefault
protected boolean enabledByDefault -
visuals
-
gameTestData
-
listeners
-
-
Constructor Details
-
AbstractTest
protected AbstractTest()
-
-
Method Details
-
configureFrom
-
configureGameTest
protected final void configureGameTest(@Nullable @Nullable GameTest gameTest, @Nullable @Nullable EmptyTemplate template) -
gameTestTemplate
-
init
Description copied from interface:TestThis method is called when the test is registered to aTestFramework. -
onDisabled
public void onDisabled()Description copied from interface:TestThis method is called when this test is disabled.- Specified by:
onDisabledin interfaceTest
-
onEnabled
Description copied from interface:TestThis method is called when this test is enabled. -
onGameTest
-
id
Description copied from interface:TestReturns the ID of this test. -
enabledByDefault
public boolean enabledByDefault()Description copied from interface:TestReturns if this test is enabled by default.- Specified by:
enabledByDefaultin interfaceTest- Returns:
- if this test is enabled by default
-
visuals
Description copied from interface:TestReturns the visual information about the test. -
asGameTest
Description copied from interface:TestReturns the game test version of this test.- Specified by:
asGameTestin interfaceTest- Returns:
- the game test version of this test
-
listeners
Description copied from interface:TestReturns the listeners of this test. -
groups
Description copied from interface:TestA list of the groups of this test.
If this list is empty, the test will be only in theungroupedgroup. -
isEnabled
public boolean isEnabled() -
enable
public void enable() -
logger
public org.slf4j.Logger logger() -
status
-
updateStatus
-
fail
-
pass
protected void pass() -
requestConfirmation
-