2010-09-19 01:29:21 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
/***************************************************************************
|
|
|
|
|
* (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. *
|
|
|
|
|
* *
|
|
|
|
|
***************************************************************************/
|
2007-11-09 20:41:12 +00:00
|
|
|
package utilities;
|
|
|
|
|
|
2007-11-09 22:40:30 +00:00
|
|
|
import static org.junit.Assert.assertTrue;
|
2007-11-09 20:41:12 +00:00
|
|
|
|
|
|
|
|
import org.junit.After;
|
|
|
|
|
import org.junit.Before;
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
2017-05-28 01:03:01 +02:00
|
|
|
import games.stendhal.server.entity.player.Player;
|
|
|
|
|
import marauroa.common.game.RPObject;
|
|
|
|
|
|
2007-12-09 22:08:50 +00:00
|
|
|
public class PlayerTestHelperTest {
|
2007-11-09 20:41:12 +00:00
|
|
|
|
|
|
|
|
@Before
|
|
|
|
|
public void setUp() throws Exception {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@After
|
|
|
|
|
public void tearDown() throws Exception {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public final void testAddEmptySlots() {
|
2007-12-09 22:08:50 +00:00
|
|
|
PlayerTestHelper.generatePlayerRPClasses();
|
2008-07-12 14:44:47 +00:00
|
|
|
final Player bob = new Player(new RPObject());
|
2007-12-09 22:08:50 +00:00
|
|
|
PlayerTestHelper.addEmptySlots(bob);
|
2017-05-28 01:03:01 +02:00
|
|
|
|
2007-11-09 20:41:12 +00:00
|
|
|
assertTrue(bob.hasSlot("bag"));
|
|
|
|
|
assertTrue(bob.hasSlot("lhand"));
|
|
|
|
|
assertTrue(bob.hasSlot("rhand"));
|
|
|
|
|
assertTrue(bob.hasSlot("armor"));
|
|
|
|
|
assertTrue(bob.hasSlot("head"));
|
|
|
|
|
assertTrue(bob.hasSlot("legs"));
|
|
|
|
|
assertTrue(bob.hasSlot("feet"));
|
|
|
|
|
assertTrue(bob.hasSlot("finger"));
|
|
|
|
|
assertTrue(bob.hasSlot("cloak"));
|
|
|
|
|
assertTrue(bob.hasSlot("keyring"));
|
|
|
|
|
assertTrue(bob.hasSlot("!quests"));
|
|
|
|
|
assertTrue(bob.hasSlot("!kills"));
|
|
|
|
|
assertTrue(bob.hasSlot("!tutorial"));
|
2007-11-15 12:34:26 +00:00
|
|
|
assertTrue(bob.hasSlot("!visited"));
|
2007-11-09 20:41:12 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|