Package games.stendhal.server.actions.attack

Examples of games.stendhal.server.actions.attack.StopAction


   * Tests for onAction.
   */
  @Test
  public void testOnAction() {

    final StopAction sa = new StopAction();
    PlayerTestHelper.generatePlayerRPClasses();
    final Player player = new Player(new RPObject()) {
      @Override
      public void stopAttack() {
        stopattack = true;

      }

      @Override
      public void notifyWorldAboutChanges() {
        notify = true;

      }

    };
    final RPAction action = new RPAction();
    sa.onAction(player, action);

    assertTrue(notify);
    assertFalse(stopattack);
    action.put("attack", "value");
    notify = false;
    stopattack = false;

    sa.onAction(player, action);

    assertTrue(notify);
    assertTrue(stopattack);

  }
View Full Code Here

TOP

Related Classes of games.stendhal.server.actions.attack.StopAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.