Пример #1
0
  public void testCreateArena() {
    MatchParams mp = loadParams("Arena");
    assertNotNull(mp);

    Arena arena = ArenaType.createArena("testArena", mp);
    assertNotNull(arena);
    ParamController.addMatchParams(mp);
    bac.addArena(arena);
  }
Пример #2
0
  public void testQueue() {
    MatchParams mp = loadParams("Arena");
    Player p1 = new TestBukkitPlayer("p1");
    Player p2 = new TestBukkitPlayer("p2");
    ArenaPlayer ap1 = BattleArena.toArenaPlayer(p1);
    ArenaPlayer ap2 = BattleArena.toArenaPlayer(p2);
    String[] args = new String[] {""};

    BAExecutor exec = new BAExecutor();
    exec.join(ap1, mp, args);
    exec.join(ap2, mp, args);
    for (MatchParams params : ParamController.getAllParams()) {
      System.out.println("param  =  " + params);
    }
    delay(50);
    assertTrue(bac.isInQue(ap1));
  }