// 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); }
// Tests that calculate food returns 0 when there is no food in the cell. @Test public void test_calculateFoodAmount() { Cell c = new Cell(); assertTrue(c.calculateFoodAmount() == 0); }