public SimulationTest setRole(Role role, String... players) { GameStage stage = (GameStage) bot.getStage(); for (String s : players) { Player player = stage.getPlayer(s); player.setRole(AbstractRole.create(role, player)); player.getRole().setStage(stage); } return this; }
protected void checkForMessage(String s) { if (!bot.getMessageLog().toString().toLowerCase().contains(s.toLowerCase())) { throw new RuntimeException("Could not find message in the log: " + s); } }
protected void checkForAbsence(String s) { if (bot.getMessageLog().toString().toLowerCase().contains(s.toLowerCase())) { throw new RuntimeException("Found message that shouldn't exist: " + s); } }