Beispiel #1
0
 // Tests that calculate food returns 2 when there is 2 blobs of food in the cell.
 @Test
 public void test_calculateFoodAmount2() {
   Cell c = new Cell();
   c.addFood();
   c.addFood();
   assertTrue(c.calculateFoodAmount() == 2);
 }
Beispiel #2
0
 // Tests that calculate food returns 100 when there is 100 blobs of food in the cell.
 @Test
 public void test_calculateFoodAmount3() {
   Cell c = new Cell();
   for (int i = 0; i < 100; i++) {
     c.addFood();
   }
   assertTrue(c.calculateFoodAmount() == 100);
 }
Beispiel #3
0
 @Test
 public void test_checkConditionFood() {
   c.addFood();
   assertTrue(c.checkCondition(Condition.Food) == true);
 }