Esempio n. 1
0
  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;
  }
Esempio n. 2
0
 protected void checkForMessage(String s) {
   if (!bot.getMessageLog().toString().toLowerCase().contains(s.toLowerCase())) {
     throw new RuntimeException("Could not find message in the log: " + s);
   }
 }
Esempio n. 3
0
 protected void checkForAbsence(String s) {
   if (bot.getMessageLog().toString().toLowerCase().contains(s.toLowerCase())) {
     throw new RuntimeException("Found message that shouldn't exist: " + s);
   }
 }