Inventory extends Observable implements Iterable<SimpleResource> { public int getSize() { int i = 0; i = inventoryArray.size(); return i; } 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 initialTest() { rucksack = new Inventory(); assertEquals(rucksack.getSize(), 0); }
@Test public void getSizeTest() { rucksack = new Inventory(); rucksack.addToRucksack(new SimpleResource("Banana", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Apple", hashtable, 10)); rucksack.addToRucksack(new SimpleResource("Cake", hashtable, 10)); assertEquals(rucksack.getSize(), 3); }