I am trying to test a method from one of my subclasses and I keep getting the error "cannot find symbol - method addMoney()." I've never had issues seeing methods while testing before. This is my test.
and here is the method that I am trying to test in my subclass
and the code in my world subclass
public void setUp()
{
island = new Island();
bob = new Minnow();
}
public void testAddMoney()
{
island.add(bob, 2, 2);
run(island, 51);
bob.addMoney();
assertEquals(11, island.getMoney());
}public void addMoney()
{
Island island = (Island) getWorld();
island.addFunds(1);
}public int addFunds(int funds)
{
total = total + funds;
if(food <= 0)
{
return 0;
}
else
{
return funds;
}
}