@Test public void dropBombTest() { // character should drop bomb Character c = new Character(); c.dropBomb(); List<Bomb> bombs = BombSystem.getInstance().getBombs(); assertFalse(bombs.isEmpty()); }
@Test public void dropBombAtSamePlaceTest() { // character should drop bomb into their own place Character c = new Character(); c.setX(3.0d); c.setY(3.0d); c.dropBomb(); List<Bomb> bombs = BombSystem.getInstance().getBombs(); Bomb bomb = bombs.get(0); assertTrue(bomb.getX() == 3.0d); }
@Before public void setUp() throws Exception { BombSystem.createInstance(); }