Update of /cvsroot/arianne/stendhal/tests/games/stendhal/server/actions/admin
In directory vz-cvs-4.sog:/tmp/cvs-serv5166/tests/games/stendhal/server/actions/admin
Modified Files:
SummonActionTest.java
Log Message:
adding tests that try to spot fishing rod being parsed to fish rod (patches ID: 3530110 by astridemma, related to bug ID: 3297023)
Index: SummonActionTest.java
===================================================================
RCS file: /cvsroot/arianne/stendhal/tests/games/stendhal/server/actions/admin/SummonActionTest.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** SummonActionTest.java 1 May 2011 21:20:27 -0000 1.13
--- SummonActionTest.java 28 May 2012 08:18:46 -0000 1.14
***************
*** 134,137 ****
--- 134,157 ----
}
+ @Test
+ public final void testSummonFishingRod() {
+ final Player pl = PlayerTestHelper.createPlayer("hugo");
+
+ MockStendhalRPRuleProcessor.get().addPlayer(pl);
+
+ zone.add(pl);
+ pl.setPosition(1, 1);
+ pl.put("adminlevel", 5000);
+ final RPAction action = new RPAction();
+ action.put("type", "summon");
+ action.put("creature", "fishing rod");
+ action.put("x", 0);
+ action.put("y", 0);
+ CommandCenter.execute(pl, action);
+ assertEquals(1, pl.getID().getObjectID());
+ final Item item = (Item) zone.getEntityAt(0, 0);
+ assertEquals("fishing_rod", item.get("subclass"));
+ }
+
/**
* Tests for avoidNFE.
|