Ejemplo n.º 1
0
  /** Tests initialization */
  @Test
  public void testInit() {
    BattleScene b = new BattleScene();

    assertEquals(null, b.getSystem());
    assertEquals(null, b.getDisplay());

    b.start();

    // should make a blank formation
    assertTrue(((BattleSystem) b.getSystem()).getFormation().size() == 0);
  }
Ejemplo n.º 2
0
  /** Tests intitializing with a formation */
  @Test
  public void testInitWithFormation() {
    BattleScene b = new BattleScene();
    Formation f = new Formation();
    f.add(new Enemy("Gel"));

    assertEquals(null, b.getSystem());
    assertEquals(null, b.getDisplay());

    b.start(f);

    assertEquals(f, ((BattleSystem) b.getSystem()).getFormation());
  }