Package net.minecraft.gametest.framework
Class GameTestRegistry
java.lang.Object
net.minecraft.gametest.framework.GameTestRegistry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map
<String, Consumer<ServerLevel>> private static final Map
<String, Consumer<ServerLevel>> private static final Set
<TestFunction> private static final Collection
<TestFunction> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional
<TestFunction> findTestFunction
(String testName) static void
static Consumer
<ServerLevel> getAfterBatchFunction
(String functionName) static Collection
<String> static Collection
<TestFunction> static Consumer
<ServerLevel> getBeforeBatchFunction
(String functionName) static Stream
<TestFunction> static TestFunction
getTestFunction
(String testName) static Stream
<TestFunction> getTestFunctionsForClassName
(String className) static boolean
isTestClass
(String className) private static boolean
isTestFunctionPartOfClass
(TestFunction testFunction, String className) static void
Deprecated.static void
Deprecated.Forge: UseRegisterGameTestsEvent
to register game testsstatic void
Deprecated.Forge: UseRegisterGameTestsEvent
to register game testsprivate static <T extends Annotation>
voidregisterBatchFunction
(Method testMethod, Class<T> annotationType, Function<T, String> valueGetter, Map<String, Consumer<ServerLevel>> positioning) static void
rememberFailedTest
(TestFunction testFunction) private static Consumer
<?> turnMethodIntoConsumer
(Method testMethod) private static TestFunction
turnMethodIntoTestFunction
(Method testMethod) private static Collection
<TestFunction> useTestGeneratorMethod
(Method testMethod)
-
Field Details
-
TEST_FUNCTIONS
-
TEST_CLASS_NAMES
-
BEFORE_BATCH_FUNCTIONS
-
AFTER_BATCH_FUNCTIONS
-
LAST_FAILED_TESTS
-
-
Constructor Details
-
GameTestRegistry
public GameTestRegistry()
-
-
Method Details
-
register
Deprecated.Forge: UseRegisterGameTestsEvent
to register game tests -
register
Deprecated.Forge: UseRegisterGameTestsEvent
to register game tests -
register
Deprecated.Forge: UseRegisterGameTestsEvent
to register game tests -
registerBatchFunction
private static <T extends Annotation> void registerBatchFunction(Method testMethod, Class<T> annotationType, Function<T, String> valueGetter, Map<String, Consumer<ServerLevel>> positioning) -
getTestFunctionsForClassName
-
getAllTestFunctions
-
getAllTestClassNames
-
isTestClass
-
getBeforeBatchFunction
-
getAfterBatchFunction
-
findTestFunction
-
getTestFunction
-
useTestGeneratorMethod
-
turnMethodIntoTestFunction
-
turnMethodIntoConsumer
-
isTestFunctionPartOfClass
-
getLastFailedTests
-
rememberFailedTest
-
forgetFailedTests
public static void forgetFailedTests()
-
RegisterGameTestsEvent
to register game tests