Package games.stendhal.server.script

Source Code of games.stendhal.server.script.ListRaidsTest

/* $Id: ListRaidsTest.java,v 1.4 2010/12/04 15:44:47 martinfuchs Exp $ */
/***************************************************************************
*                   (C) Copyright 2003-2010 - Stendhal                    *
***************************************************************************
***************************************************************************
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
*                                                                         *
***************************************************************************/
package games.stendhal.server.script;

import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertThat;
import games.stendhal.server.entity.player.Player;
import games.stendhal.server.maps.MockStendhalRPRuleProcessor;
import games.stendhal.server.maps.MockStendlRPWorld;

import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;

import utilities.PlayerTestHelper;

public class ListRaidsTest {

  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    MockStendlRPWorld.get();
  }

  @After
  public void tearDown() throws Exception {
    MockStendhalRPRuleProcessor.get().clearPlayers();
  }

  /**
   * Tests for name.
   */
  @Test
  public void testname() throws Exception {
    ListRaids script = new ListRaids();
    Player player = PlayerTestHelper.createPlayer("george");
    script.execute(player, null);
    assertThat(player.events().get(0).toString(), containsString("CreateRaid"));
  }

}
TOP

Related Classes of games.stendhal.server.script.ListRaidsTest

TOP
Copyright © 2018 www.massapi.com. 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.