// 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); }
// 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); }
@Test public void test_checkConditionFood() { c.addFood(); assertTrue(c.checkCondition(Condition.Food) == true); }