diff --git a/src/test/java/seedu/binbash/ItemListTest.java b/src/test/java/seedu/binbash/ItemListTest.java index d190b6dbbf..d0b512ab1b 100644 --- a/src/test/java/seedu/binbash/ItemListTest.java +++ b/src/test/java/seedu/binbash/ItemListTest.java @@ -15,4 +15,25 @@ void deleteItem_oneItemInItemList_noItemInItemList() { assertEquals(0, itemList.getItemCount()); } + + @Test + void addItem_noItemInItemList_oneItemInItemList() { + ItemList itemList = new ItemList(); + + itemList.addItem("testItem", "A test item"); + assertEquals(1, itemList.getItemCount()); + } + + @Test + void addItem_itemNameAndDescription_correctItemNameAndDescription() { + ItemList itemList = new ItemList(); + + itemList.addItem("testItem", "A test item"); + Item item = itemList.getItemList().get(0); + + assertEquals(item.getItemName(), "testItem"); + assertEquals(item.getItemDescription(), "A test item"); + } + + }