예제 #1
0
 @Test
 public void amoebeShouldExcrement() {
   Amoebe amoebe = AmoebeFactory.get(this.compassProvider, Game.Color.RED);
   int[] position = {0, 0};
   Square square = SquareFactory.get(position);
   amoebe.setSquare(square);
   square.enterSquare(amoebe);
   assertTrue(square.getFoodcubes().size() == 6);
   amoebe.excrement();
   assertTrue(square.getFoodcubes().size() == 8);
 }
예제 #2
0
 @Test
 public void amoebeShouldDie() {
   Amoebe amoebe = AmoebeFactory.get(this.compassProvider, Game.Color.RED);
   int[] position = {0, 0};
   Square square = SquareFactory.get(position);
   amoebe.setSquare(square);
   square.enterSquare(amoebe);
   assertTrue(square.getAmoebesList().size() == 1);
   amoebe.die();
   assertTrue(square.getAmoebesList().size() == 0);
 }