Class ConditionalCodecTest

java.lang.Object
net.neoforged.neoforge.oldtest.conditions.ConditionalCodecTest

public class ConditionalCodecTest extends Object
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 Classes
    Modifier and Type
    Class
    Description
    private static class 
     
    private static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
     
    private static final com.google.gson.Gson
     
    private static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConditionalCodecTest(net.neoforged.bus.api.IEventBus modBus)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static <T> void
    assertEquals(T expected, T actual)
    While JUnit is added via modImplementation, it is not actually available in the GAME layer at the moment.
    private static void
    assertErrored(com.mojang.serialization.DataResult<?> result)
     
    private static com.google.gson.JsonElement
     
    private static <T> String
    write(com.mojang.serialization.Codec<T> codec, T input)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      private static com.google.gson.JsonElement read(String s)
    • write

      private static <T> String write(com.mojang.serialization.Codec<T> codec, T input)
    • assertEquals

      private static <T> void assertEquals(T expected, T actual)
      While JUnit is added via modImplementation, 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)