assertEquals("queststate", james.getQuest("questname"));
}
@Test
public void alterQuestActionPerformthroughCommandcenter() throws Exception {
final Player pl = PlayerTestHelper.createPlayer("player");
final Player bob = PlayerTestHelper.createPlayer("bob");
MockStendhalRPRuleProcessor.get().addPlayer(pl);
MockStendhalRPRuleProcessor.get().addPlayer(bob);
pl.put("adminlevel", 5000);
RPAction action = new RPAction();
action.put("type", "alterquest");
action.put("target", "bob");
action.put("name", "questname");
action.put("state", "queststate");
CommandCenter.execute(pl, action);
assertTrue(bob.hasQuest("questname"));
assertEquals("queststate", bob.getQuest("questname"));
action = new RPAction();
action.put("type", "alterquest");
action.put("target", "bob");
action.put("name", "questname");
CommandCenter.execute(pl, action);
assertFalse(bob.hasQuest("questname"));
}