Inventory extends Observable implements Iterable<SimpleResource> { public boolean isFull() { return (inventoryArray.size() == INVENTORY_SIZE); } Inventory(); int addToRucksack(SimpleResource resource); int removeFromRucksack(SimpleResource resource, int quantity); void setEquippedTool(ToolType tool); ToolType getEquippedTool(); SimpleResource getResource(String type); boolean containsTool(ToolType type); boolean containsItem(SimpleResource item); boolean isFull(); int getSize(); ArrayList<SimpleResource> getList(); void handleObservers(); @Override Iterator<SimpleResource> iterator(); @Override String toString();  }
@Test public void isFullTest() { rucksack = new Inventory(); assertEquals(rucksack.isFull(), false); rucksack.addToRucksack(new SimpleResource("Banana", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Apple", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Cake", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Melon", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Fruit 1", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Fruit 2", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Fruit 3", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Fruit 4", hashtable, 10)); assertEquals(rucksack.isFull(), true); }