Class SkriptJUnitTest

java.lang.Object
ch.njol.skript.test.runner.SkriptJUnitTest

public abstract class SkriptJUnitTest extends Object
Class that helps the JUnit test communicate with Skript.
  • Constructor Details

    • SkriptJUnitTest

      public SkriptJUnitTest()
  • Method Details

    • getShutdownDelay

      public static long getShutdownDelay()
      The delay this JUnit test is requiring to run. Do note this is global to all other tests. The most delay is the final waiting time.
      Returns:
      the delay in Minecraft ticks this junit test is requiring to run for.
    • setShutdownDelay

      public static void setShutdownDelay(long delay)
      Parameters:
      delay - Set the delay in Minecraft ticks for this test to run.
    • cleanup

      public final void cleanup()
    • getTestWorld

      public static org.bukkit.World getTestWorld()
      Returns:
      the test world.
    • getTestLocation

      public static org.bukkit.Location getTestLocation()
      Returns:
      the testing location at the spawn of the testing world.
    • spawnTestPig

      public static org.bukkit.entity.Pig spawnTestPig()
      Spawns a testing pig at the spawn location of the testing world.
      Returns:
      Pig that has been spawned.
    • setBlock

      public static org.bukkit.block.Block setBlock(org.bukkit.Material material)
      Set the type of the block at the testing location.
      Parameters:
      material - The material to set the block to.
      Returns:
      the Block after it has been updated.
    • getBlock

      public static org.bukkit.block.Block getBlock()
      Return the main block for testing in the getTestLocation();
      Returns:
      the Block after it has been updated.
    • getCurrentJUnitTest

      public static String getCurrentJUnitTest()
      Get the currently running JUnit test name.
    • setCurrentJUnitTest

      public static void setCurrentJUnitTest(String currentJUnitTest)
      Used internally.
    • clearJUnitTest

      public static void clearJUnitTest()
      Used internally.