Class ConditionalCodecTest
java.lang.Object
net.neoforged.neoforge.oldtest.conditions.ConditionalCodecTest
Tests for
ConditionalOps and related methods.
We do not have JUnit support at the moment,
so these unit tests run in the FMLCommonSetupEvent.
If you can get to the main menu, it means that the tests passed.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> voidassertEquals(T expected, T actual) While JUnit is added viamodImplementation, it is not actually available in the GAME layer at the moment.private static voidassertErrored(com.mojang.serialization.DataResult<?> result) private static com.google.gson.JsonElementprivate static <T> Stringwrite(com.mojang.serialization.Codec<T> codec, T input)
-
Field Details
-
ENABLED
public static final boolean ENABLED- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
GSON
private static final com.google.gson.Gson GSON
-
-
Constructor Details
-
ConditionalCodecTest
public ConditionalCodecTest(net.neoforged.bus.api.IEventBus modBus)
-
-
Method Details
-
read
-
write
-
assertEquals
private static <T> void assertEquals(T expected, T actual) While JUnit is added viamodImplementation, it is not actually available in the GAME layer at the moment. This function can be replaced by JUnit assertions once we have support for non-mod dependencies in NeoGradle. -
assertErrored
private static void assertErrored(com.mojang.serialization.DataResult<?> result)
-