Class TestHelpers

java.lang.Object
org.cyclops.integrateddynamics.core.test.TestHelpers

public class TestHelpers extends Object
Helpers for tests
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> void
    assertEqual(T actual, T expected, String ifEqual)
    Assertion for equal objects.
    static <T> void
    assertNonEqual(T actual, T expected, String ifNonEqual)
    Assertion for non equal objects.
    static <T> void
    assertNonNull(T actual, String ifNonNull)
    Assertion for non null objects.
    static <T> void
    assertNull(T actual, String ifNull)
    Assertion for null objects.
    static boolean
     
    static <T> T
    deserialize(net.minecraft.nbt.CompoundTag tag, Function<net.minecraft.world.level.storage.ValueInput,T> serializer)
     
    static <T> T
    deserialize(net.minecraft.nbt.CompoundTag tag, Function<net.minecraft.world.level.storage.ValueInput,T> serializer, net.minecraft.core.HolderLookup.Provider holderLookup)
     
    static <T> net.minecraft.nbt.CompoundTag
    serialize(Consumer<net.minecraft.world.level.storage.ValueOutput> deserializer)
     
    static <T> net.minecraft.nbt.CompoundTag
    serialize(Consumer<net.minecraft.world.level.storage.ValueOutput> deserializer, net.minecraft.core.HolderLookup.Provider holderLookup)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestHelpers

      public TestHelpers()
  • Method Details

    • canRunIntegrationTests

      public static boolean canRunIntegrationTests()
    • assertEqual

      public static <T> void assertEqual(T actual, T expected, String ifEqual)
      Assertion for equal objects.
      Type Parameters:
      T - The type.
      Parameters:
      actual - Actual value.
      expected - Expected value.
      ifEqual - Message identifying the assertion.
    • assertNonEqual

      public static <T> void assertNonEqual(T actual, T expected, String ifNonEqual)
      Assertion for non equal objects.
      Type Parameters:
      T - The type.
      Parameters:
      actual - Actual value.
      expected - Expected value.
      ifNonEqual - Message identifying the assertion.
    • assertNull

      public static <T> void assertNull(T actual, String ifNull)
      Assertion for null objects.
      Type Parameters:
      T - The type.
      Parameters:
      actual - Actual value.
      ifNull - Message identifying the assertion.
    • assertNonNull

      public static <T> void assertNonNull(T actual, String ifNonNull)
      Assertion for non null objects.
      Type Parameters:
      T - The type.
      Parameters:
      actual - Actual value.
      ifNonNull - Message identifying the assertion.
    • serialize

      public static <T> net.minecraft.nbt.CompoundTag serialize(Consumer<net.minecraft.world.level.storage.ValueOutput> deserializer)
    • serialize

      public static <T> net.minecraft.nbt.CompoundTag serialize(Consumer<net.minecraft.world.level.storage.ValueOutput> deserializer, net.minecraft.core.HolderLookup.Provider holderLookup)
    • deserialize

      public static <T> T deserialize(net.minecraft.nbt.CompoundTag tag, Function<net.minecraft.world.level.storage.ValueInput,T> serializer)
    • deserialize

      public static <T> T deserialize(net.minecraft.nbt.CompoundTag tag, Function<net.minecraft.world.level.storage.ValueInput,T> serializer, net.minecraft.core.HolderLookup.Provider holderLookup)