Class AbstractTest
java.lang.Object
net.neoforged.testframework.impl.test.AbstractTest
- Direct Known Subclasses:
AbstractTest.Dynamic
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
static class
Nested classes/interfaces inherited from interface net.neoforged.testframework.Test
Test.EventListenerGroup, Test.Result, Test.Status, Test.Visuals
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected TestFramework
protected @Nullable GameTestData
protected String
protected final Set
<TestListener> protected Test.Visuals
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable GameTestData
Returns the game test version of this test.protected final void
protected final void
configureGameTest
(@Nullable GameTest gameTest, @Nullable EmptyTemplate template) void
enable()
boolean
Returns if this test is enabled by default.protected void
protected String
gameTestTemplate
(GameTest gameTest) groups()
A list of the groups of this test.id()
Returns the ID of this test.void
init
(TestFramework framework) This method is called when the test is registered to aTestFramework
.boolean
Returns the listeners of this test.org.slf4j.Logger
logger()
void
This method is called when this test is disabled.void
onEnabled
(Test.EventListenerGroup buses) This method is called when this test is enabled.protected void
onGameTest
(GameTestHelper helper) protected void
pass()
final void
requestConfirmation
(Player player, Component message) status()
void
updateStatus
(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, wait
Methods 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:Test
This method is called when the test is registered to aTestFramework
. -
onDisabled
public void onDisabled()Description copied from interface:Test
This method is called when this test is disabled.- Specified by:
onDisabled
in interfaceTest
-
onEnabled
Description copied from interface:Test
This method is called when this test is enabled. -
onGameTest
-
id
Description copied from interface:Test
Returns the ID of this test. -
enabledByDefault
public boolean enabledByDefault()Description copied from interface:Test
Returns if this test is enabled by default.- Specified by:
enabledByDefault
in interfaceTest
- Returns:
- if this test is enabled by default
-
visuals
Description copied from interface:Test
Returns the visual information about the test. -
asGameTest
Description copied from interface:Test
Returns the game test version of this test.- Specified by:
asGameTest
in interfaceTest
- Returns:
- the game test version of this test
-
listeners
Description copied from interface:Test
Returns the listeners of this test. -
groups
Description copied from interface:Test
A list of the groups of this test.
If this list is empty, the test will be only in theungrouped
group. -
isEnabled
public boolean isEnabled() -
enable
public void enable() -
logger
public org.slf4j.Logger logger() -
status
-
updateStatus
-
fail
-
pass
protected void pass() -
requestConfirmation
-