Skip to content

Commit

Permalink
Add JUnit test for execute method in AddCommand class
Browse files Browse the repository at this point in the history
  • Loading branch information
imanamirshah committed Mar 14, 2024
1 parent e19c686 commit 1f3475c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/seedu/binbash/command/AddCommandTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package seedu.binbash.command;

import org.junit.jupiter.api.Test;
import seedu.binbash.Item;
import seedu.binbash.ItemList;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class AddCommandTest {

@Test
void execute_item_oneItemInItemList() {
ItemList itemList = new ItemList();

itemList.addItem("testItem", "A test item");
assertEquals(1, itemList.getItemCount());
}
}

0 comments on commit 1f3475c

Please sign in to comment.