Package utilities

Class ZoneAndPlayerTestImpl

Direct Known Subclasses:
ZonePlayerAndNPCTestImpl

public abstract class ZoneAndPlayerTestImpl extends QuestHelper
Base class for quest tests.
Author:
Martin Fuchs
  • Field Details

    • zone

      protected StendhalRPZone zone
      Zone used in the test.
    • player

      protected Player player
      Player object to be used in the test.
    • quest

      protected AbstractQuest quest
  • Constructor Details

    • ZoneAndPlayerTestImpl

      protected ZoneAndPlayerTestImpl()
    • ZoneAndPlayerTestImpl

      protected ZoneAndPlayerTestImpl(String zoneName)
      Protected constructor to initialize the zone member variable.
      Parameters:
      zoneName -
  • Method Details

    • setZoneForPlayer

      protected void setZoneForPlayer(String zoneName)
    • setupZone

      public static void setupZone(String zoneName, ZoneConfigurator... zoneConfigurators)
      Setup and configure zone with the configurators given as parameters before starting the test.
      Parameters:
      zoneName -
      zoneConfigurators -
    • setupZone

      public static StendhalRPZone setupZone(String zoneName)
      Creates zone and adds it to RPWorld.
      Parameters:
      zoneName -
      Returns:
      the new created zone
    • setupZone

      public static StendhalRPZone setupZone(String zoneName, boolean collisions)
      Creates zone and adds it to RPWorld.
      Parameters:
      zoneName -
      collisions -
      Returns:
      the new created zone
    • setUp

      public void setUp() throws Exception
      Create the player to be used in the test.
      Throws:
      Exception
    • tearDown

      public void tearDown() throws Exception
      Reset all involved NPCs.
      Throws:
      Exception
    • assertHistory

      protected void assertHistory(String... entries)
    • assertNoHistory

      protected void assertNoHistory()
    • assertGainKarma

      protected void assertGainKarma(double delta)
    • assertLoseKarma

      protected void assertLoseKarma(double delta)