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 pTestName) static void
static Consumer
<ServerLevel> getAfterBatchFunction
(String pFunctionName) static Collection
<String> static Collection
<TestFunction> static Consumer
<ServerLevel> getBeforeBatchFunction
(String pFunctionName) static Stream
<TestFunction> static TestFunction
getTestFunction
(String pTestName) static Stream
<TestFunction> getTestFunctionsForClassName
(String pClassName) static boolean
isTestClass
(String pClassName) private static boolean
isTestFunctionPartOfClass
(TestFunction pTestFunction, String pClassName) 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 pTestMethod, Class<T> pAnnotationType, Function<T, String> pValueGetter, Map<String, Consumer<ServerLevel>> pPositioning) static void
rememberFailedTest
(TestFunction pTestFunction) private static Consumer
<?> turnMethodIntoConsumer
(Method pTestMethod) private static TestFunction
turnMethodIntoTestFunction
(Method pTestMethod) private static Collection
<TestFunction> useTestGeneratorMethod
(Method pTestMethod)
-
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 pTestMethod, Class<T> pAnnotationType, Function<T, String> pValueGetter, Map<String, Consumer<ServerLevel>> pPositioning) -
getTestFunctionsForClassName
-
getAllTestFunctions
-
getAllTestClassNames
-
isTestClass
-
getBeforeBatchFunction
-
getAfterBatchFunction
-
findTestFunction
-
getTestFunction
-
useTestGeneratorMethod
-
turnMethodIntoTestFunction
-
turnMethodIntoConsumer
-
isTestFunctionPartOfClass
-
getLastFailedTests
-
rememberFailedTest
-
forgetFailedTests
public static void forgetFailedTests()
-
RegisterGameTestsEvent
to register game tests